From 4b730bb242c3deeeedbca00aab4b5cc5dd5fc2fe Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 3 Feb 2025 20:28:44 -0600 Subject: [PATCH 001/124] Issue#881: Converting to object for classification. 1) library_clause can be parsed. --- vsg/data_structure.py | 57 ++++++++++++++++++++++ vsg/vhdlFile/classify/context_clause.py | 5 +- vsg/vhdlFile/classify/context_item.py | 25 +++++----- vsg/vhdlFile/classify/design_file.py | 11 ++--- vsg/vhdlFile/classify/design_unit.py | 14 +++--- vsg/vhdlFile/classify/library_clause.py | 24 +++++---- vsg/vhdlFile/classify/logical_name_list.py | 13 ++--- vsg/vhdlFile/utils.py | 50 +++++++++---------- vsg/vhdlFile/vhdlFile.py | 6 ++- 9 files changed, 127 insertions(+), 78 deletions(-) create mode 100644 vsg/data_structure.py diff --git a/vsg/data_structure.py b/vsg/data_structure.py new file mode 100644 index 000000000..39cd5d28d --- /dev/null +++ b/vsg/data_structure.py @@ -0,0 +1,57 @@ + +from vsg import parser + + +def New(lAllObjects): + return design_file(lAllObjects) + + +class design_file: + + def __init__(self, lAllObjects): + self.lAllObjects = lAllObjects + self.iCurrent = 0 + + def advance_to_next_token(self): + iTemp = self.iCurrent + for iTemp, oToken in enumerate(self.lAllObjects[self.iCurrent::]): + if type(oToken) == parser.item: + self.iCurrent = self.iCurrent + iTemp + return True + return False + + def current_token_lower_value_is(self, sString): + if self.get_current_token_lower_value() == sString: + return True + return False + + def get_current_index(self): + return self.iCurrent + + def get_current_token_lower_value(self): + return self.lAllObjects[self.iCurrent].lower_value + + def is_next_token(self, sString): + self.advance_to_next_token() + if self.lAllObjects[self.iCurrent].get_lower_value() == sString: + return True + return False + + def is_next_token_one_of(self, lString): + self.advance_to_next_token() + if self.lAllObjects[self.iCurrent].lower_value in lString: + return True + return False + + def replace_current_token_with(self, token): + self.lAllObjects[self.iCurrent] = token(self.lAllObjects[self.iCurrent].get_value()) + self.iCurrent += 1 + + def replace_next_token_with(self, token): + self.advance_to_next_token() + self.replace_current_token_with(token) + + def replace_next_token_with_if(self, sString, token): + self.advance_to_next_token() + if self.current_token_lower_value_is(sString): + self.replace_current_token_with(token) diff --git a/vsg/vhdlFile/classify/context_clause.py b/vsg/vhdlFile/classify/context_clause.py index 93756ffa7..8301930a1 100644 --- a/vsg/vhdlFile/classify/context_clause.py +++ b/vsg/vhdlFile/classify/context_clause.py @@ -4,10 +4,9 @@ from vsg.vhdlFile.classify import context_item -def detect(iToken, lObjects): +def detect(oDesignFile): """ context_clause ::= { context_item } """ - iCurrent = utils.detect_submodule(iToken, lObjects, context_item) - return iCurrent + return utils.detect_production(oDesignFile, context_item) diff --git a/vsg/vhdlFile/classify/context_item.py b/vsg/vhdlFile/classify/context_item.py index 80f3c02bf..25f9fd0df 100644 --- a/vsg/vhdlFile/classify/context_item.py +++ b/vsg/vhdlFile/classify/context_item.py @@ -3,7 +3,7 @@ from vsg.vhdlFile.classify import context_reference, library_clause, use_clause -def detect(iToken, lObjects): +def detect(oDesignFile): """ context_item ::= library_clause @@ -11,16 +11,17 @@ def detect(iToken, lObjects): | context_reference """ - iCurrent = library_clause.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if library_clause.detect(oDesignFile): + return True - iCurrent = use_clause.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent +# iCurrent = use_clause.detect(oDesignFile) +# if iCurrent != iToken: +# return iCurrent +# +# iCurrent = context_reference.detect(iToken, lObjects) +# if iCurrent != iToken: +# return iCurrent +# +# return iToken - iCurrent = context_reference.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent - - return iToken + return False diff --git a/vsg/vhdlFile/classify/design_file.py b/vsg/vhdlFile/classify/design_file.py index 8df7c4a52..818ff7b94 100644 --- a/vsg/vhdlFile/classify/design_file.py +++ b/vsg/vhdlFile/classify/design_file.py @@ -4,15 +4,10 @@ from vsg.vhdlFile.classify import design_unit -def tokenize(lObjects): +def tokenize(oDesignFile): """ design_file ::= design_unit { design_unit } """ - iCurrent = 0 - while iCurrent < len(lObjects): - iReturn = design_unit.detect(iCurrent, lObjects) - if iReturn == iCurrent: - iCurrent += 1 - else: - iCurrent = iReturn + while design_unit.detect(oDesignFile): + pass diff --git a/vsg/vhdlFile/classify/design_unit.py b/vsg/vhdlFile/classify/design_unit.py index 80a29dcaf..bba95bf0c 100644 --- a/vsg/vhdlFile/classify/design_unit.py +++ b/vsg/vhdlFile/classify/design_unit.py @@ -3,17 +3,15 @@ from vsg.vhdlFile.classify import context_clause, library_unit -def detect(iToken, lObjects): +def detect(oDesignFile): """ design_unit ::= context_clause library_unit """ - iCurrent = context_clause.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if context_clause.detect(oDesignFile): + return True - iCurrent = library_unit.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent +# if library_unit.detect(oDesignFile): +# return True - return iToken + return False diff --git a/vsg/vhdlFile/classify/library_clause.py b/vsg/vhdlFile/classify/library_clause.py index 73fd20717..070ccbf75 100644 --- a/vsg/vhdlFile/classify/library_clause.py +++ b/vsg/vhdlFile/classify/library_clause.py @@ -5,22 +5,26 @@ from vsg.vhdlFile.classify import logical_name_list -def detect(iToken, lObjects): +def detect(oDesignFile): """ library_clause ::= library logic_name_list ; """ - if utils.is_next_token("library", iToken, lObjects): - iCurrent = classify(iToken, lObjects) - return iCurrent - return iToken + if oDesignFile.is_next_token("library"): + return classify(oDesignFile) + return False +# if utils.is_next_token("library", iToken, lObjects): +# iCurrent = classify(iToken, lObjects) +# return iCurrent +# return iToken -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("library", token.keyword, iToken, lObjects) - iCurrent = logical_name_list.classify_until([";"], iCurrent, lObjects) +def classify(oDesignFile): + utils.assign_next_token_required("library", token.keyword, oDesignFile) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + logical_name_list.classify_until([";"], oDesignFile) - return iCurrent + utils.assign_next_token_required(";", token.semicolon, oDesignFile) + + return True diff --git a/vsg/vhdlFile/classify/logical_name_list.py b/vsg/vhdlFile/classify/logical_name_list.py index 9a002485f..7dd4f1fe3 100644 --- a/vsg/vhdlFile/classify/logical_name_list.py +++ b/vsg/vhdlFile/classify/logical_name_list.py @@ -4,16 +4,11 @@ from vsg.vhdlFile import utils -def classify_until(lUntils, iToken, lObjects): +def classify_until(lUntils, oDesignFile): """ logical_name_list ::= logical_name { , logical_name } """ - iCurrent = iToken - iLast = 0 - while iLast != iCurrent: - iLast = iCurrent - if lObjects[utils.find_next_token(iCurrent, lObjects)].get_lower_value() in lUntils: - return iCurrent - iCurrent = utils.assign_next_token_if(",", token.comma, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.logical_name, iCurrent, lObjects) + while not oDesignFile.is_next_token_one_of(lUntils): + oDesignFile.replace_next_token_with(token.logical_name) + oDesignFile.replace_next_token_with_if(",", token.comma) diff --git a/vsg/vhdlFile/utils.py b/vsg/vhdlFile/utils.py index 43c8bb79b..2674bab94 100644 --- a/vsg/vhdlFile/utils.py +++ b/vsg/vhdlFile/utils.py @@ -32,15 +32,8 @@ def assign_tokens_until_ignoring_paren(sToken, token, iToken, lObjects): return None -def assign_next_token(token, iToken, lObjects): - iCurrent = find_next_token(iToken, lObjects) - try: - lObjects[iCurrent] = token(lObjects[iCurrent].get_value()) - except TypeError: - lObjects[iCurrent] = token() - iCurrent += 1 - return iCurrent - +def assign_next_token(token, oDesignFile): + oDesignFile.replace_next_token_with(token) def assign_token(lObjects, iToken, token): iCurrent = find_next_token(iToken, lObjects) @@ -78,14 +71,23 @@ def assign_next_token_if_not_one_of(lTokens, token, iToken, lObjects): return iToken -def assign_next_token_required(sToken, token, iToken, lObjects): - iCurrent = find_next_token(iToken, lObjects) - if object_value_is(lObjects, iCurrent, sToken): - lObjects[iCurrent] = token(lObjects[iCurrent].get_value()) - return iCurrent + 1 +def assign_next_token_required(sToken, token, oDesignFile): + if oDesignFile.is_next_token(sToken): + oDesignFile.replace_current_token_with(token) else: - print_error_message(sToken, token, iCurrent, lObjects) - return iToken + print_error_message(sToken, token, oDesignFile) + +# oDesignFile.advance_to_next_token() +# +# +# +# iCurrent = find_next_token(iToken, lObjects) +# if object_value_is(lObjects, iCurrent, sToken): +# lObjects[iCurrent] = token(lObjects[iCurrent].get_value()) +# return iCurrent + 1 +# else: +# print_error_message(sToken, token, iCurrent, lObjects) +# return iToken def assign_tokens_until_matching_closing_paren(token, iToken, lObjects): @@ -308,17 +310,13 @@ def find_previous_non_whitespace_token(iToken, lObjects): return iCurrent -def detect_submodule(iToken, lObjects, module): - iLast = -1 - iReturn = iToken - while iLast != iReturn: - if is_next_token("end", iReturn, lObjects): - return iToken - iReturn = find_next_token(iReturn, lObjects) - iLast = iReturn - iReturn = module.detect(iReturn, lObjects) +def detect_production(oDesignFile, production): + while oDesignFile.advance_to_next_token(): - return iReturn + if not production.detect(oDesignFile): + return False + + return False def has_label(iObject, lObjects): diff --git a/vsg/vhdlFile/vhdlFile.py b/vsg/vhdlFile/vhdlFile.py index ca5dd4f0a..460d958cd 100644 --- a/vsg/vhdlFile/vhdlFile.py +++ b/vsg/vhdlFile/vhdlFile.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from vsg import config, exceptions, parser, token, tokens +from vsg import config, exceptions, parser, token, tokens, data_structure from vsg.token import ( adding_operator, aggregate, @@ -126,6 +126,7 @@ def __init__(self, filecontent, commandLineArguments=default_cla, sFilename=None def _processFile(self): oOptions = options() + self.lAllObjects = [] for sLine in self.filecontent: self.dVars["line"] = sLine @@ -149,7 +150,8 @@ def _processFile(self): pass try: - design_file.tokenize(self.lAllObjects) + oDesignFile = data_structure.New(self.lAllObjects) + design_file.tokenize(oDesignFile) except exceptions.ClassifyError as e: if self.commandLineArguments.force_fix and self.commandLineArguments.fix: print(e.message) From eae317db8e23e78d67a4870b962e0b7ec466cc56 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 3 Feb 2025 21:04:48 -0600 Subject: [PATCH 002/124] Refactoring to improve readability. --- vsg/data_structure.py | 35 ++++++++++++---------- vsg/vhdlFile/classify/context_clause.py | 7 ++--- vsg/vhdlFile/classify/context_item.py | 22 +++++++------- vsg/vhdlFile/classify/design_file.py | 5 ++-- vsg/vhdlFile/classify/design_unit.py | 8 ++--- vsg/vhdlFile/classify/library_clause.py | 23 +++++--------- vsg/vhdlFile/classify/logical_name_list.py | 9 +++--- vsg/vhdlFile/classify/utils.py | 7 +++++ vsg/vhdlFile/utils.py | 29 +----------------- vsg/vhdlFile/vhdlFile.py | 8 ++--- 10 files changed, 64 insertions(+), 89 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 39cd5d28d..69f2563a9 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -1,4 +1,4 @@ - +# -*- coding: utf-8 -*- from vsg import parser @@ -13,17 +13,20 @@ def __init__(self, lAllObjects): self.iCurrent = 0 def advance_to_next_token(self): - iTemp = self.iCurrent - for iTemp, oToken in enumerate(self.lAllObjects[self.iCurrent::]): + for iIndex, oToken in enumerate(self.lAllObjects[self.iCurrent::]): if type(oToken) == parser.item: - self.iCurrent = self.iCurrent + iTemp + self.iCurrent = self.iCurrent + iIndex return True return False + def assign_next_token_required(self, sToken, token): + if self.is_next_token(sToken): + self.replace_current_token_with(token) + else: + print_error_message(sToken, token, oDesignFile) + def current_token_lower_value_is(self, sString): - if self.get_current_token_lower_value() == sString: - return True - return False + return self.get_current_token_lower_value() == sString def get_current_index(self): return self.iCurrent @@ -31,21 +34,23 @@ def get_current_index(self): def get_current_token_lower_value(self): return self.lAllObjects[self.iCurrent].lower_value + def get_current_token_value(self): + return self.lAllObjects[self.iCurrent].get_value() + + def increment_current_index(self): + self.iCurrent += 1 + def is_next_token(self, sString): self.advance_to_next_token() - if self.lAllObjects[self.iCurrent].get_lower_value() == sString: - return True - return False + return self.current_token_lower_value_is(sString) def is_next_token_one_of(self, lString): self.advance_to_next_token() - if self.lAllObjects[self.iCurrent].lower_value in lString: - return True - return False + return self.get_current_token_lower_value() in lString def replace_current_token_with(self, token): - self.lAllObjects[self.iCurrent] = token(self.lAllObjects[self.iCurrent].get_value()) - self.iCurrent += 1 + self.lAllObjects[self.iCurrent] = token(self.get_current_token_value()) + self.increment_current_index() def replace_next_token_with(self, token): self.advance_to_next_token() diff --git a/vsg/vhdlFile/classify/context_clause.py b/vsg/vhdlFile/classify/context_clause.py index 8301930a1..f6b65c286 100644 --- a/vsg/vhdlFile/classify/context_clause.py +++ b/vsg/vhdlFile/classify/context_clause.py @@ -1,12 +1,11 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import context_item +from vsg.vhdlFile.classify import context_item, utils -def detect(oDesignFile): +def detect(oDataStructure): """ context_clause ::= { context_item } """ - return utils.detect_production(oDesignFile, context_item) + return utils.detect_production(oDataStructure, context_item) diff --git a/vsg/vhdlFile/classify/context_item.py b/vsg/vhdlFile/classify/context_item.py index 25f9fd0df..d821d58a3 100644 --- a/vsg/vhdlFile/classify/context_item.py +++ b/vsg/vhdlFile/classify/context_item.py @@ -3,7 +3,7 @@ from vsg.vhdlFile.classify import context_reference, library_clause, use_clause -def detect(oDesignFile): +def detect(oDataStructure): """ context_item ::= library_clause @@ -11,17 +11,17 @@ def detect(oDesignFile): | context_reference """ - if library_clause.detect(oDesignFile): + if library_clause.detect(oDataStructure): return True -# iCurrent = use_clause.detect(oDesignFile) -# if iCurrent != iToken: -# return iCurrent -# -# iCurrent = context_reference.detect(iToken, lObjects) -# if iCurrent != iToken: -# return iCurrent -# -# return iToken + # iCurrent = use_clause.detect(oDataStructure) + # if iCurrent != iToken: + # return iCurrent + # + # iCurrent = context_reference.detect(iToken, lObjects) + # if iCurrent != iToken: + # return iCurrent + # + # return iToken return False diff --git a/vsg/vhdlFile/classify/design_file.py b/vsg/vhdlFile/classify/design_file.py index 818ff7b94..77f544b34 100644 --- a/vsg/vhdlFile/classify/design_file.py +++ b/vsg/vhdlFile/classify/design_file.py @@ -1,13 +1,12 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import design_unit -def tokenize(oDesignFile): +def tokenize(oDataStructure): """ design_file ::= design_unit { design_unit } """ - while design_unit.detect(oDesignFile): + while design_unit.detect(oDataStructure): pass diff --git a/vsg/vhdlFile/classify/design_unit.py b/vsg/vhdlFile/classify/design_unit.py index bba95bf0c..0cb6a22a1 100644 --- a/vsg/vhdlFile/classify/design_unit.py +++ b/vsg/vhdlFile/classify/design_unit.py @@ -3,15 +3,15 @@ from vsg.vhdlFile.classify import context_clause, library_unit -def detect(oDesignFile): +def detect(oDataStructure): """ design_unit ::= context_clause library_unit """ - if context_clause.detect(oDesignFile): + if context_clause.detect(oDataStructure): return True -# if library_unit.detect(oDesignFile): -# return True + # if library_unit.detect(oDataStructure): + # return True return False diff --git a/vsg/vhdlFile/classify/library_clause.py b/vsg/vhdlFile/classify/library_clause.py index 070ccbf75..90b77ad22 100644 --- a/vsg/vhdlFile/classify/library_clause.py +++ b/vsg/vhdlFile/classify/library_clause.py @@ -1,30 +1,23 @@ # -*- coding: utf-8 -*- from vsg.token import library_clause as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import logical_name_list -def detect(oDesignFile): +def detect(oDataStructure): """ library_clause ::= library logic_name_list ; """ - if oDesignFile.is_next_token("library"): - return classify(oDesignFile) + if oDataStructure.is_next_token("library"): + classify(oDataStructure) + return True return False -# if utils.is_next_token("library", iToken, lObjects): -# iCurrent = classify(iToken, lObjects) -# return iCurrent -# return iToken +def classify(oDataStructure): + oDataStructure.assign_next_token_required("library", token.keyword) -def classify(oDesignFile): - utils.assign_next_token_required("library", token.keyword, oDesignFile) + logical_name_list.classify_until([";"], oDataStructure) - logical_name_list.classify_until([";"], oDesignFile) - - utils.assign_next_token_required(";", token.semicolon, oDesignFile) - - return True + oDataStructure.assign_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/logical_name_list.py b/vsg/vhdlFile/classify/logical_name_list.py index 7dd4f1fe3..60f89edc1 100644 --- a/vsg/vhdlFile/classify/logical_name_list.py +++ b/vsg/vhdlFile/classify/logical_name_list.py @@ -1,14 +1,13 @@ # -*- coding: utf-8 -*- from vsg.token import logical_name_list as token -from vsg.vhdlFile import utils -def classify_until(lUntils, oDesignFile): +def classify_until(lUntils, oDataStructure): """ logical_name_list ::= logical_name { , logical_name } """ - while not oDesignFile.is_next_token_one_of(lUntils): - oDesignFile.replace_next_token_with(token.logical_name) - oDesignFile.replace_next_token_with_if(",", token.comma) + while not oDataStructure.is_next_token_one_of(lUntils): + oDataStructure.replace_next_token_with(token.logical_name) + oDataStructure.replace_next_token_with_if(",", token.comma) diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 5f51d3497..e40c45eaa 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -15,6 +15,13 @@ def classify_selected_name(iToken, lObjects, token): return iNewIndex +def detect_production(oDesignFile, production): + while oDesignFile.advance_to_next_token(): + if not production.detect(oDesignFile): + return False + return False + + def build_selected_name_token_list(lTokens, token): if is_use_clause_selected_name(token): return build_use_clause_selected_name_token_list(lTokens, token) diff --git a/vsg/vhdlFile/utils.py b/vsg/vhdlFile/utils.py index 2674bab94..8944b5f63 100644 --- a/vsg/vhdlFile/utils.py +++ b/vsg/vhdlFile/utils.py @@ -35,6 +35,7 @@ def assign_tokens_until_ignoring_paren(sToken, token, iToken, lObjects): def assign_next_token(token, oDesignFile): oDesignFile.replace_next_token_with(token) + def assign_token(lObjects, iToken, token): iCurrent = find_next_token(iToken, lObjects) try: @@ -71,25 +72,6 @@ def assign_next_token_if_not_one_of(lTokens, token, iToken, lObjects): return iToken -def assign_next_token_required(sToken, token, oDesignFile): - if oDesignFile.is_next_token(sToken): - oDesignFile.replace_current_token_with(token) - else: - print_error_message(sToken, token, oDesignFile) - -# oDesignFile.advance_to_next_token() -# -# -# -# iCurrent = find_next_token(iToken, lObjects) -# if object_value_is(lObjects, iCurrent, sToken): -# lObjects[iCurrent] = token(lObjects[iCurrent].get_value()) -# return iCurrent + 1 -# else: -# print_error_message(sToken, token, iCurrent, lObjects) -# return iToken - - def assign_tokens_until_matching_closing_paren(token, iToken, lObjects): iCounter = 1 iCurrent = iToken @@ -310,15 +292,6 @@ def find_previous_non_whitespace_token(iToken, lObjects): return iCurrent -def detect_production(oDesignFile, production): - while oDesignFile.advance_to_next_token(): - - if not production.detect(oDesignFile): - return False - - return False - - def has_label(iObject, lObjects): iCurrent = find_next_token(iObject, lObjects) iCurrent = increment_token_count(iCurrent) diff --git a/vsg/vhdlFile/vhdlFile.py b/vsg/vhdlFile/vhdlFile.py index 460d958cd..83fa977ef 100644 --- a/vsg/vhdlFile/vhdlFile.py +++ b/vsg/vhdlFile/vhdlFile.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from vsg import config, exceptions, parser, token, tokens, data_structure +from vsg import config, data_structure, exceptions, parser, token, tokens from vsg.token import ( adding_operator, aggregate, @@ -126,7 +126,7 @@ def __init__(self, filecontent, commandLineArguments=default_cla, sFilename=None def _processFile(self): oOptions = options() - + self.lAllObjects = [] for sLine in self.filecontent: self.dVars["line"] = sLine @@ -150,8 +150,8 @@ def _processFile(self): pass try: - oDesignFile = data_structure.New(self.lAllObjects) - design_file.tokenize(oDesignFile) + oDataStructure = data_structure.New(self.lAllObjects) + design_file.tokenize(oDataStructure) except exceptions.ClassifyError as e: if self.commandLineArguments.force_fix and self.commandLineArguments.fix: print(e.message) From c701c61ed26439dd6618750e202683973ab36fbd Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 3 Feb 2025 21:06:03 -0600 Subject: [PATCH 003/124] Running style checks. --- vsg/data_structure.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 69f2563a9..d53870576 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -7,13 +7,12 @@ def New(lAllObjects): class design_file: - def __init__(self, lAllObjects): self.lAllObjects = lAllObjects self.iCurrent = 0 def advance_to_next_token(self): - for iIndex, oToken in enumerate(self.lAllObjects[self.iCurrent::]): + for iIndex, oToken in enumerate(self.lAllObjects[self.iCurrent : :]): if type(oToken) == parser.item: self.iCurrent = self.iCurrent + iIndex return True From 03852b8d312429777cf18bd026a9226aa99bce5f Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 3 Feb 2025 21:34:57 -0600 Subject: [PATCH 004/124] Can now parse the use_clause production. --- vsg/data_structure.py | 10 ++++++++++ vsg/vhdlFile/classify/context_item.py | 7 +++---- vsg/vhdlFile/classify/use_clause.py | 27 ++++++++++++--------------- vsg/vhdlFile/classify/utils.py | 16 +++++++--------- 4 files changed, 32 insertions(+), 28 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index d53870576..53babf175 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -36,6 +36,9 @@ def get_current_token_lower_value(self): def get_current_token_value(self): return self.lAllObjects[self.iCurrent].get_value() + def get_next_token_value(self): + return self.lAllObjects[self.iCurrent + 1].get_value() + def increment_current_index(self): self.iCurrent += 1 @@ -47,10 +50,17 @@ def is_next_token_one_of(self, lString): self.advance_to_next_token() return self.get_current_token_lower_value() in lString + def remove_token_at_offset(self, iOffset): + self.lAllObjects.pop(self.iCurrent + iOffset) + def replace_current_token_with(self, token): self.lAllObjects[self.iCurrent] = token(self.get_current_token_value()) self.increment_current_index() + def replace_current_token_with_list_of_tokens(self, lTokens): + self.lAllObjects.pop(self.get_current_index()) + self.lAllObjects[self.get_current_index() : self.get_current_index()] = lTokens + def replace_next_token_with(self, token): self.advance_to_next_token() self.replace_current_token_with(token) diff --git a/vsg/vhdlFile/classify/context_item.py b/vsg/vhdlFile/classify/context_item.py index d821d58a3..59a3ebf3d 100644 --- a/vsg/vhdlFile/classify/context_item.py +++ b/vsg/vhdlFile/classify/context_item.py @@ -14,10 +14,9 @@ def detect(oDataStructure): if library_clause.detect(oDataStructure): return True - # iCurrent = use_clause.detect(oDataStructure) - # if iCurrent != iToken: - # return iCurrent - # + if use_clause.detect(oDataStructure): + return True + # iCurrent = context_reference.detect(iToken, lObjects) # if iCurrent != iToken: # return iCurrent diff --git a/vsg/vhdlFile/classify/use_clause.py b/vsg/vhdlFile/classify/use_clause.py index 272f8eb6b..db26e3b3c 100644 --- a/vsg/vhdlFile/classify/use_clause.py +++ b/vsg/vhdlFile/classify/use_clause.py @@ -1,28 +1,25 @@ # -*- coding: utf-8 -*- from vsg.token import use_clause as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import utils as classify_utils +from vsg.vhdlFile.classify import utils -def detect(iToken, lObjects): +def detect(oDataStructure): """ use_clause ::= use selected_name { , selected_name } ; """ - if utils.is_next_token("use", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token("use"): + classify(oDataStructure) + return True + return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("use", token.keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.assign_next_token_required("use", token.keyword) - while not utils.is_next_token(";", iCurrent, lObjects): - iCurrent = classify_utils.classify_selected_name(iCurrent, lObjects, token) + while not oDataStructure.is_next_token(";"): + utils.classify_selected_name(oDataStructure, token) + oDataStructure.replace_next_token_with_if(",", token.comma) - if utils.is_next_token(",", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(",", token.comma, iCurrent, lObjects) - - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - return iCurrent + oDataStructure.assign_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index e40c45eaa..2a7582afa 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -3,16 +3,14 @@ from vsg.vhdlFile import utils -def classify_selected_name(iToken, lObjects, token): - iTokenIndex = utils.find_next_token(iToken, lObjects) - lTokens = lObjects[iTokenIndex].get_value().split(".") - if lObjects[iTokenIndex + 1].get_value().startswith('"'): - lTokens[-1] = lObjects.pop(iTokenIndex + 1).get_value() +def classify_selected_name(oDataStructure, token): + oDataStructure.advance_to_next_token() + lTokens = oDataStructure.get_current_token_value().split(".") + if oDataStructure.get_next_token_value().startswith('"'): + lTokens[-1] = oDataStructure.get_next_token_value() + oDataStructure.remove_token_at_offset(1) lNewTokens = build_selected_name_token_list(lTokens, token) - replace_item_in_list_with_a_list_at_index(lObjects, lNewTokens, iTokenIndex) - iNewIndex = iToken + len(lNewTokens) - - return iNewIndex + oDataStructure.replace_current_token_with_list_of_tokens(lNewTokens) def detect_production(oDesignFile, production): From 5b6d7681e36fc14ae2d69e099ea7132d3ec09aa6 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 3 Feb 2025 21:41:11 -0600 Subject: [PATCH 005/124] Refactoring to improve readability. --- vsg/data_structure.py | 12 ++++++------ vsg/vhdlFile/classify/library_clause.py | 4 ++-- vsg/vhdlFile/classify/use_clause.py | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 53babf175..d0a9203b8 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -18,12 +18,6 @@ def advance_to_next_token(self): return True return False - def assign_next_token_required(self, sToken, token): - if self.is_next_token(sToken): - self.replace_current_token_with(token) - else: - print_error_message(sToken, token, oDesignFile) - def current_token_lower_value_is(self, sString): return self.get_current_token_lower_value() == sString @@ -61,6 +55,12 @@ def replace_current_token_with_list_of_tokens(self, lTokens): self.lAllObjects.pop(self.get_current_index()) self.lAllObjects[self.get_current_index() : self.get_current_index()] = lTokens + def replace_next_token_required(self, sToken, token): + if self.is_next_token(sToken): + self.replace_current_token_with(token) + else: + print_error_message(sToken, token, oDesignFile) + def replace_next_token_with(self, token): self.advance_to_next_token() self.replace_current_token_with(token) diff --git a/vsg/vhdlFile/classify/library_clause.py b/vsg/vhdlFile/classify/library_clause.py index 90b77ad22..b516973b5 100644 --- a/vsg/vhdlFile/classify/library_clause.py +++ b/vsg/vhdlFile/classify/library_clause.py @@ -16,8 +16,8 @@ def detect(oDataStructure): def classify(oDataStructure): - oDataStructure.assign_next_token_required("library", token.keyword) + oDataStructure.replace_next_token_required("library", token.keyword) logical_name_list.classify_until([";"], oDataStructure) - oDataStructure.assign_next_token_required(";", token.semicolon) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/use_clause.py b/vsg/vhdlFile/classify/use_clause.py index db26e3b3c..63627b926 100644 --- a/vsg/vhdlFile/classify/use_clause.py +++ b/vsg/vhdlFile/classify/use_clause.py @@ -16,10 +16,10 @@ def detect(oDataStructure): def classify(oDataStructure): - oDataStructure.assign_next_token_required("use", token.keyword) + oDataStructure.replace_next_token_required("use", token.keyword) while not oDataStructure.is_next_token(";"): utils.classify_selected_name(oDataStructure, token) oDataStructure.replace_next_token_with_if(",", token.comma) - oDataStructure.assign_next_token_required(";", token.semicolon) + oDataStructure.replace_next_token_required(";", token.semicolon) From f5ed66fd8f6e9ce17247f20c58651242a78a6cf5 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 3 Feb 2025 21:55:40 -0600 Subject: [PATCH 006/124] context_reference production can be classified. --- vsg/data_structure.py | 7 ++++++ vsg/vhdlFile/classify/context_item.py | 8 +------ vsg/vhdlFile/classify/context_reference.py | 26 +++++++++++----------- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index d0a9203b8..47788164e 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -21,6 +21,13 @@ def advance_to_next_token(self): def current_token_lower_value_is(self, sString): return self.get_current_token_lower_value() == sString + def does_string_exist_before_string(self, sFirst, sSecond): + for oToken in self.lAllObjects[self.iCurrent : :]: + if oToken.lower_value == sSecond: + return False + if oToken.lower_value == sFirst: + return True + def get_current_index(self): return self.iCurrent diff --git a/vsg/vhdlFile/classify/context_item.py b/vsg/vhdlFile/classify/context_item.py index 59a3ebf3d..02e6ce225 100644 --- a/vsg/vhdlFile/classify/context_item.py +++ b/vsg/vhdlFile/classify/context_item.py @@ -17,10 +17,4 @@ def detect(oDataStructure): if use_clause.detect(oDataStructure): return True - # iCurrent = context_reference.detect(iToken, lObjects) - # if iCurrent != iToken: - # return iCurrent - # - # return iToken - - return False + return context_reference.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/context_reference.py b/vsg/vhdlFile/classify/context_reference.py index a6d70b2a9..55c8a25f7 100644 --- a/vsg/vhdlFile/classify/context_reference.py +++ b/vsg/vhdlFile/classify/context_reference.py @@ -5,23 +5,23 @@ from vsg.vhdlFile.classify import utils as classify_utils -def detect(iCurrent, lObjects): +def detect(oDataStructure): """ context_reference ::= context selected_name { , selected_name } ; """ - if utils.object_value_is(lObjects, iCurrent, "context"): - if not utils.find_in_range("is", iCurrent, ";", lObjects): - return classify(iCurrent, lObjects) - return iCurrent + if oDataStructure.is_next_token("context"): + if not oDataStructure.does_string_exist_before_string("is", ";"): + classify(oDataStructure) + return True + return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("context", token.keyword, iToken, lObjects) - iCurrent = classify_utils.classify_selected_name(iCurrent, lObjects, token) - while utils.is_next_token(",", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(",", token.comma, iCurrent, lObjects) - iCurrent = classify_utils.classify_selected_name(iCurrent, lObjects, token) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.keyword) + classify_utils.classify_selected_name(oDataStructure, token) + while oDataStructure.is_next_token(","): + oDataStructure.replace_next_token_with(token.comma) + classify_utils.classify_selected_name(oDataStructure, token) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) From 0b3f0a597a1ba62612ffcb90be340e2d2a52518a Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 3 Feb 2025 22:10:09 -0600 Subject: [PATCH 007/124] Refactoring. --- vsg/vhdlFile/classify/context_reference.py | 12 ++++++------ vsg/vhdlFile/classify/library_clause.py | 2 +- vsg/vhdlFile/classify/use_clause.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vsg/vhdlFile/classify/context_reference.py b/vsg/vhdlFile/classify/context_reference.py index 55c8a25f7..e5af5ae74 100644 --- a/vsg/vhdlFile/classify/context_reference.py +++ b/vsg/vhdlFile/classify/context_reference.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- from vsg.token import context_reference as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import utils as classify_utils +from vsg.vhdlFile.classify import utils def detect(oDataStructure): @@ -18,10 +17,11 @@ def detect(oDataStructure): def classify(oDataStructure): - oDataStructure.replace_next_token_with(token.keyword) - classify_utils.classify_selected_name(oDataStructure, token) + oDataStructure.replace_current_token_with(token.keyword) + utils.classify_selected_name(oDataStructure, token) + while oDataStructure.is_next_token(","): - oDataStructure.replace_next_token_with(token.comma) - classify_utils.classify_selected_name(oDataStructure, token) + oDataStructure.replace_current_token_with(token.comma) + utils.classify_selected_name(oDataStructure, token) oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/library_clause.py b/vsg/vhdlFile/classify/library_clause.py index b516973b5..c4ee9de6d 100644 --- a/vsg/vhdlFile/classify/library_clause.py +++ b/vsg/vhdlFile/classify/library_clause.py @@ -16,7 +16,7 @@ def detect(oDataStructure): def classify(oDataStructure): - oDataStructure.replace_next_token_required("library", token.keyword) + oDataStructure.replace_current_token_with(token.keyword) logical_name_list.classify_until([";"], oDataStructure) diff --git a/vsg/vhdlFile/classify/use_clause.py b/vsg/vhdlFile/classify/use_clause.py index 63627b926..806afb103 100644 --- a/vsg/vhdlFile/classify/use_clause.py +++ b/vsg/vhdlFile/classify/use_clause.py @@ -16,7 +16,7 @@ def detect(oDataStructure): def classify(oDataStructure): - oDataStructure.replace_next_token_required("use", token.keyword) + oDataStructure.replace_current_token_with(token.keyword) while not oDataStructure.is_next_token(";"): utils.classify_selected_name(oDataStructure, token) From 8e4e29228a9b436b36405efb1a544a8250ac355c Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 3 Feb 2025 22:25:08 -0600 Subject: [PATCH 008/124] context_declaration production now classifies. --- vsg/data_structure.py | 5 +++ vsg/vhdlFile/classify/context_declaration.py | 33 +++++++-------- vsg/vhdlFile/classify/design_unit.py | 5 +-- vsg/vhdlFile/classify/library_unit.py | 16 +++---- vsg/vhdlFile/classify/primary_unit.py | 44 ++++++++++---------- 5 files changed, 51 insertions(+), 52 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 47788164e..03866c6d2 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -76,3 +76,8 @@ def replace_next_token_with_if(self, sString, token): self.advance_to_next_token() if self.current_token_lower_value_is(sString): self.replace_current_token_with(token) + + def replace_next_token_with_if_not(self, sString, token): + self.advance_to_next_token() + if not self.current_token_lower_value_is(sString): + self.replace_current_token_with(token) diff --git a/vsg/vhdlFile/classify/context_declaration.py b/vsg/vhdlFile/classify/context_declaration.py index 79bb475a7..bc91a8b7d 100644 --- a/vsg/vhdlFile/classify/context_declaration.py +++ b/vsg/vhdlFile/classify/context_declaration.py @@ -1,11 +1,10 @@ # -*- coding: utf-8 -*- from vsg.token import context_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import context_clause -def detect(iToken, lObjects): +def detect(oDataStructure): """ context_declaration ::= context identifier is @@ -13,23 +12,21 @@ def detect(iToken, lObjects): end [ context ] [ context_simple_name ] ; """ - iCurrent = utils.find_next_token(iToken, lObjects) - if utils.object_value_is(lObjects, iCurrent, "context"): - if utils.find_in_range("is", iCurrent, ";", lObjects): - return classify(iCurrent, lObjects) - return iToken + if oDataStructure.is_next_token("context"): + if oDataStructure.does_string_exist_before_string("is", ";"): + classify(oDataStructure) + return True + return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("context", token.context_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token(token.identifier, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_current_token_with(token.context_keyword) + oDataStructure.replace_next_token_with(token.identifier) + oDataStructure.replace_next_token_required("is", token.is_keyword) - iCurrent = context_clause.detect(iCurrent, lObjects) + context_clause.detect(oDataStructure) - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if("context", token.end_context_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.context_simple_name, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_with_if("context", token.end_context_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.context_simple_name) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/design_unit.py b/vsg/vhdlFile/classify/design_unit.py index 0cb6a22a1..dd1ab7945 100644 --- a/vsg/vhdlFile/classify/design_unit.py +++ b/vsg/vhdlFile/classify/design_unit.py @@ -11,7 +11,4 @@ def detect(oDataStructure): if context_clause.detect(oDataStructure): return True - # if library_unit.detect(oDataStructure): - # return True - - return False + return library_unit.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/library_unit.py b/vsg/vhdlFile/classify/library_unit.py index 8ef6128f2..04755c4f4 100644 --- a/vsg/vhdlFile/classify/library_unit.py +++ b/vsg/vhdlFile/classify/library_unit.py @@ -3,19 +3,19 @@ from vsg.vhdlFile.classify import primary_unit, secondary_unit -def detect(iToken, lObjects): +def detect(oDataStructure): """ library_unit ::= primary_unit | secondary_unit """ - iCurrent = primary_unit.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if primary_unit.detect(oDataStructure): + return True - iCurrent = secondary_unit.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent - return iToken +# iCurrent = secondary_unit.detect(iToken, lObjects) +# if iCurrent != iToken: +# return iCurrent +# +# return iToken diff --git a/vsg/vhdlFile/classify/primary_unit.py b/vsg/vhdlFile/classify/primary_unit.py index 49a49e3c0..29494d94d 100644 --- a/vsg/vhdlFile/classify/primary_unit.py +++ b/vsg/vhdlFile/classify/primary_unit.py @@ -9,7 +9,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ primary_unit ::= entity_declaration @@ -20,24 +20,24 @@ def detect(iToken, lObjects): | PSL_Verification_Unit """ - iReturned = context_declaration.detect(iToken, lObjects) - if iReturned != iToken: - return iReturned - - iReturned = entity_declaration.detect(iToken, lObjects) - if iReturned != iToken: - return iReturned - - iReturned = package_declaration.detect(iToken, lObjects) - if iReturned != iToken: - return iReturned - - iReturned = package_instantiation_declaration.detect(iToken, lObjects) - if iReturned != iToken: - return iReturned - - iReturned = configuration_declaration.detect(iToken, lObjects) - if iReturned != iToken: - return iReturned - - return iToken + if context_declaration.detect(oDataStructure): + return True + + +# iReturned = entity_declaration.detect(iToken, lObjects) +# if iReturned != iToken: +# return iReturned +# +# iReturned = package_declaration.detect(iToken, lObjects) +# if iReturned != iToken: +# return iReturned +# +# iReturned = package_instantiation_declaration.detect(iToken, lObjects) +# if iReturned != iToken: +# return iReturned +# +# iReturned = configuration_declaration.detect(iToken, lObjects) +# if iReturned != iToken: +# return iReturned +# +# return iToken From 39fed6f5d46248e92128f52034c00881ad0e29b6 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Tue, 4 Feb 2025 22:10:26 -0600 Subject: [PATCH 009/124] Parsing entity_declaration --- vsg/data_structure.py | 32 +++++++ vsg/vhdlFile/classify/alias_declaration.py | 10 +-- .../classify/attribute_declaration.py | 9 +- .../classify/attribute_specification.py | 9 +- .../classify/component_declaration.py | 10 +-- .../classify/configuration_declaration.py | 9 +- vsg/vhdlFile/classify/constant_declaration.py | 10 +-- vsg/vhdlFile/classify/entity_declaration.py | 51 ++++------- .../classify/entity_declarative_item.py | 85 ++++++++----------- .../classify/entity_declarative_part.py | 6 +- vsg/vhdlFile/classify/entity_header.py | 8 +- vsg/vhdlFile/classify/file_declaration.py | 10 +-- .../classify/full_type_declaration.py | 9 +- .../classify/function_specification.py | 11 +-- vsg/vhdlFile/classify/generic_clause.py | 24 +++--- .../classify/incomplete_type_declaration.py | 9 +- vsg/vhdlFile/classify/package_body.py | 9 +- vsg/vhdlFile/classify/package_declaration.py | 17 ++-- .../package_instantiation_declaration.py | 9 +- vsg/vhdlFile/classify/port_clause.py | 23 +++-- vsg/vhdlFile/classify/primary_unit.py | 26 ++---- .../classify/procedure_specification.py | 11 +-- vsg/vhdlFile/classify/signal_declaration.py | 10 +-- vsg/vhdlFile/classify/subprogram_body.py | 9 +- .../classify/subprogram_declaration.py | 11 ++- .../subprogram_instantiation_declaration.py | 15 ++-- vsg/vhdlFile/classify/subprogram_kind.py | 14 ++- .../classify/subprogram_specification.py | 13 +-- vsg/vhdlFile/classify/subtype_declaration.py | 10 +-- vsg/vhdlFile/classify/type_declaration.py | 13 +-- vsg/vhdlFile/classify/utils.py | 6 +- vsg/vhdlFile/classify/variable_declaration.py | 12 ++- 32 files changed, 244 insertions(+), 266 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 03866c6d2..b412cb1a0 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -10,6 +10,7 @@ class design_file: def __init__(self, lAllObjects): self.lAllObjects = lAllObjects self.iCurrent = 0 + self.iSeek = 0 def advance_to_next_token(self): for iIndex, oToken in enumerate(self.lAllObjects[self.iCurrent : :]): @@ -18,6 +19,14 @@ def advance_to_next_token(self): return True return False + def are_next_consecutive_tokens(self, lTokens): + for sToken in lTokens: + self.seek_to_next_token() + if sToken is not None: + if not self.seek_token_lower_value_is(sToken): + return False + return True + def current_token_lower_value_is(self, sString): return self.get_current_token_lower_value() == sString @@ -28,6 +37,13 @@ def does_string_exist_before_string(self, sFirst, sSecond): if oToken.lower_value == sFirst: return True + def exists_in_next_n_tokens(self, sString, iNumTokens): + for x in range(0, iNumTokens): + self.seek_to_next_token() + if self.seek_token_lower_value_is(sString): + return True + return False + def get_current_index(self): return self.iCurrent @@ -40,6 +56,9 @@ def get_current_token_value(self): def get_next_token_value(self): return self.lAllObjects[self.iCurrent + 1].get_value() + def get_seek_token_lower_value(self): + return self.lAllObjects[self.iSeek].lower_value + def increment_current_index(self): self.iCurrent += 1 @@ -81,3 +100,16 @@ def replace_next_token_with_if_not(self, sString, token): self.advance_to_next_token() if not self.current_token_lower_value_is(sString): self.replace_current_token_with(token) + + def seek_to_next_token(self): + # jcl - might need to watch out for going past the end of the lAllObjects list + if self.iSeek < self.iCurrent: + self.iSeek = self.iCurrent + for iIndex, oToken in enumerate(self.lAllObjects[self.iSeek : :]): + if type(oToken) == parser.item: + self.iSeek = self.iSeek + iIndex + return True + return False + + def seek_token_lower_value_is(self, sString): + return self.get_seek_token_lower_value() == sString diff --git a/vsg/vhdlFile/classify/alias_declaration.py b/vsg/vhdlFile/classify/alias_declaration.py index bb7357ed2..37bfce2da 100644 --- a/vsg/vhdlFile/classify/alias_declaration.py +++ b/vsg/vhdlFile/classify/alias_declaration.py @@ -5,16 +5,16 @@ from vsg.vhdlFile.classify import name, signature, subtype_indication -def detect(iToken, lObjects): +def detect(oDataStructure): """ alias_declaration ::= alias alias_designator [ : subtype_indication ] is name [ signature ] ; """ - if utils.is_next_token("alias", iToken, lObjects): - return classify(iToken, lObjects) - - return iToken + if oDataStructure.is_next_token("alias"): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/attribute_declaration.py b/vsg/vhdlFile/classify/attribute_declaration.py index 4a4cf7b91..9386a3861 100644 --- a/vsg/vhdlFile/classify/attribute_declaration.py +++ b/vsg/vhdlFile/classify/attribute_declaration.py @@ -5,14 +5,15 @@ from vsg.vhdlFile.classify import type_mark -def detect(iToken, lObjects): +def detect(oDataStructure): """ attribute_declaration ::= attribute identifier : type_mark ; """ - if utils.are_next_consecutive_tokens(["attribute", None, ":"], iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.are_next_consecutive_tokens(["attribute", None, ":"]): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/attribute_specification.py b/vsg/vhdlFile/classify/attribute_specification.py index a73c970e7..0d3f86e89 100644 --- a/vsg/vhdlFile/classify/attribute_specification.py +++ b/vsg/vhdlFile/classify/attribute_specification.py @@ -5,14 +5,15 @@ from vsg.vhdlFile.classify import entity_specification, expression -def detect(iToken, lObjects): +def detect(oDataStructure): """ attribute_specification ::= attribute attribute_designator of entity_specification is expression ; """ - if utils.are_next_consecutive_tokens(["attribute", None, "of"], iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.are_next_consecutive_tokens(["attribute", None, "of"]): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/component_declaration.py b/vsg/vhdlFile/classify/component_declaration.py index 6d91825ff..b4a14ae83 100644 --- a/vsg/vhdlFile/classify/component_declaration.py +++ b/vsg/vhdlFile/classify/component_declaration.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import generic_clause, port_clause -def detect(iToken, lObjects): +def detect(oDataStructure): """ component_declaration ::= component identifier [ is ] @@ -14,10 +14,10 @@ def detect(iToken, lObjects): end component [ *component*_simple_name ] ; """ - if utils.is_next_token("component", iToken, lObjects): - return classify(iToken, lObjects) - else: - return iToken + if oDataStructure.is_next_token("component"): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/configuration_declaration.py b/vsg/vhdlFile/classify/configuration_declaration.py index 9998d2afb..34c039f65 100644 --- a/vsg/vhdlFile/classify/configuration_declaration.py +++ b/vsg/vhdlFile/classify/configuration_declaration.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import block_configuration, configuration_declarative_part -def detect(iToken, lObjects): +def detect(oDataStructure): """ configuration_declaration ::= configuration identifier of *entity*_name is @@ -15,9 +15,10 @@ def detect(iToken, lObjects): end [ configuration ] [ *configuration*_simple_name ] ; """ - if utils.is_next_token("configuration", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token("configuration"): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/constant_declaration.py b/vsg/vhdlFile/classify/constant_declaration.py index 2c180ac20..e8bb030de 100644 --- a/vsg/vhdlFile/classify/constant_declaration.py +++ b/vsg/vhdlFile/classify/constant_declaration.py @@ -5,16 +5,16 @@ from vsg.vhdlFile.classify import expression, identifier_list, subtype_indication -def detect(iToken, lObjects): +def detect(oDataStructure): """ constant_declaration ::= constant identifier_list : subtype_indication [ := expression ] ; """ - if utils.is_next_token("constant", iToken, lObjects): - return classify(iToken, lObjects) - - return iToken + if oDataStructure.is_next_token("constant"): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/entity_declaration.py b/vsg/vhdlFile/classify/entity_declaration.py index b52cab6af..78cc132b5 100644 --- a/vsg/vhdlFile/classify/entity_declaration.py +++ b/vsg/vhdlFile/classify/entity_declaration.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg.token import entity_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( entity_declarative_part, entity_header, @@ -9,7 +8,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ entity_declaration ::= entity identifier is @@ -20,40 +19,26 @@ def detect(iToken, lObjects): end [ entity ] [ entity_simple_name ] ; """ - if utils.is_next_token("entity", iToken, lObjects): - return classify(iToken, lObjects) - else: - return iToken + if oDataStructure.is_next_token("entity"): + classify(oDataStructure) + return True + return False -def classify(iToken, lObjects): - iCurrent = classify_opening_declaration(iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_current_token_with(token.entity_keyword) + oDataStructure.replace_next_token_with(token.identifier) + oDataStructure.replace_next_token_required("is", token.is_keyword) - iCurrent = entity_header.detect(iCurrent, lObjects) + entity_header.detect(oDataStructure) - iCurrent = entity_declarative_part.detect(iCurrent, lObjects) + entity_declarative_part.detect(oDataStructure) - if utils.is_next_token("begin", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("begin", token.begin_keyword, iCurrent, lObjects) - iCurrent = entity_statement_part.detect(iCurrent, lObjects) + if oDataStructure.is_next_token("begin"): + oDataStructure.replace_current_token_with(token.begin_keyword) + entity_statement_part.detect(oDataStructure) - iCurrent = classify_closing_declaration(iCurrent, lObjects) - - return iCurrent - - -def classify_opening_declaration(iToken, lObjects): - iCurrent = utils.assign_next_token_required("entity", token.entity_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token(token.identifier, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iCurrent, lObjects) - - return iCurrent - - -def classify_closing_declaration(iToken, lObjects): - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("entity", token.end_entity_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.entity_simple_name, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_with_if("entity", token.end_entity_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.entity_simple_name) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/entity_declarative_item.py b/vsg/vhdlFile/classify/entity_declarative_item.py index f501fdc02..c913b5618 100644 --- a/vsg/vhdlFile/classify/entity_declarative_item.py +++ b/vsg/vhdlFile/classify/entity_declarative_item.py @@ -21,7 +21,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ entity_declarative_item ::= subprogram_declaration @@ -48,69 +48,52 @@ def detect(iToken, lObjects): | PSL_Clock_Declaration """ - iCurrent = subprogram_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - iCurrent = subprogram_body.detect(iCurrent, lObjects) - return iCurrent + if subprogram_declaration.detect(oDataStructure): + return True - iCurrent = subprogram_instantiation_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if subprogram_body.detect(oDataStructure): + return True - iCurrent = package_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if subprogram_instantiation_declaration.detect(oDataStructure): + return True - iCurrent = package_body.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if package_declaration.detect(oDataStructure): + return True - iCurrent = package_instantiation_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if package_body.detect(oDataStructure): + return True - iCurrent = type_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if package_instantiation_declaration.detect(oDataStructure): + return True - iCurrent = subtype_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if type_declaration.detect(oDataStructure): + return True - iCurrent = constant_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if subtype_declaration.detect(oDataStructure): + return True - iCurrent = signal_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if constant_declaration.detect(oDataStructure): + return True - iCurrent = variable_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if signal_declaration.detect(oDataStructure): + return True - iCurrent = file_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if variable_declaration.detect(oDataStructure): + return True - iCurrent = alias_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if file_declaration.detect(oDataStructure): + return True - iCurrent = component_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if alias_declaration.detect(oDataStructure): + return True - iCurrent = attribute_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if component_declaration.detect(oDataStructure): + return True - iCurrent = attribute_specification.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if attribute_declaration.detect(oDataStructure): + return True - iCurrent = use_clause.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if attribute_specification.detect(oDataStructure): + return True - return iToken + return use_clause.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/entity_declarative_part.py b/vsg/vhdlFile/classify/entity_declarative_part.py index 9c8f54c92..842063f72 100644 --- a/vsg/vhdlFile/classify/entity_declarative_part.py +++ b/vsg/vhdlFile/classify/entity_declarative_part.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_declarative_item -def detect(iToken, lObjects): +def detect(oDataStructure): """ entity_declarative_part ::= { entity_declarative_item } """ - return utils.detect_submodule(iToken, lObjects, entity_declarative_item) + while entity_declarative_item.detect(oDataStructure): + pass diff --git a/vsg/vhdlFile/classify/entity_header.py b/vsg/vhdlFile/classify/entity_header.py index 072ba2291..5e3a5a732 100644 --- a/vsg/vhdlFile/classify/entity_header.py +++ b/vsg/vhdlFile/classify/entity_header.py @@ -4,15 +4,13 @@ from vsg.vhdlFile.classify import generic_clause, port_clause -def detect(iToken, lObjects): +def detect(oDataStructure): """ entity_header ::= [ *formal*_generic_clause ] [ *formal*_port_clause ] """ - iReturn = generic_clause.detect(iToken, lObjects) + generic_clause.detect(oDataStructure) - iReturn = port_clause.detect(iReturn, lObjects) - - return iReturn + port_clause.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/file_declaration.py b/vsg/vhdlFile/classify/file_declaration.py index fac7348b8..7a365c519 100644 --- a/vsg/vhdlFile/classify/file_declaration.py +++ b/vsg/vhdlFile/classify/file_declaration.py @@ -9,16 +9,16 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ file_declaration ::= file identifier_list : subtype_indication [ file_open_information ] ; """ - if utils.is_next_token("file", iToken, lObjects): - return classify(iToken, lObjects) - - return iToken + if oDataStructure.is_next_token("file"): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/full_type_declaration.py b/vsg/vhdlFile/classify/full_type_declaration.py index 059e837a0..73a343817 100644 --- a/vsg/vhdlFile/classify/full_type_declaration.py +++ b/vsg/vhdlFile/classify/full_type_declaration.py @@ -5,15 +5,16 @@ from vsg.vhdlFile.classify import identifier, type_definition -def detect(iToken, lObjects): +def detect(oDataStructure): """ full_type_declaration ::= type identifier is type_definition ; """ - if utils.are_next_consecutive_tokens(["type", None, "is"], iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.are_next_consecutive_tokens(["type", None, "is"]): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/function_specification.py b/vsg/vhdlFile/classify/function_specification.py index 84b0760e0..389634b53 100644 --- a/vsg/vhdlFile/classify/function_specification.py +++ b/vsg/vhdlFile/classify/function_specification.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import formal_parameter_list, subprogram_header, type_mark -def detect(iToken, lObjects): +def detect(oDataStructure): """ function_specification ::= [ pure | impure ] function designator @@ -13,10 +13,11 @@ def detect(iToken, lObjects): [ [ parameter ] ( formal_parameter_list ) ] return type_mark """ - if utils.is_next_token_one_of(["pure", "impure", "function"], iToken, lObjects): - if not utils.find_in_next_n_tokens("new", 4, iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token_one_of(["pure", "impure", "function"]): + if not oDataStructure.exists_in_next_n_tokens("new", 4): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/generic_clause.py b/vsg/vhdlFile/classify/generic_clause.py index a6f64e993..b569ec648 100644 --- a/vsg/vhdlFile/classify/generic_clause.py +++ b/vsg/vhdlFile/classify/generic_clause.py @@ -1,27 +1,25 @@ # -*- coding: utf-8 -*- from vsg.token import generic_clause as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_list -def detect(iToken, lObjects): +def detect(oDataStructure): """ generic_clause ::= generic ( generic_list ) ; """ - if utils.are_next_consecutive_tokens(["generic", "("], iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.are_next_consecutive_tokens(["generic", "("]): + classify(iToken, lObjects) + return True + return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("generic", token.generic_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("generic", token.generic_keyword) + oDataStructure.replace_next_token_required("(", token.open_parenthesis) - iCurrent = generic_list.classify(iCurrent, lObjects) + generic_list.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(")", token.close_parenthesis) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/incomplete_type_declaration.py b/vsg/vhdlFile/classify/incomplete_type_declaration.py index 21c7c93ec..6bda8ec90 100644 --- a/vsg/vhdlFile/classify/incomplete_type_declaration.py +++ b/vsg/vhdlFile/classify/incomplete_type_declaration.py @@ -5,14 +5,15 @@ from vsg.vhdlFile.classify import identifier -def detect(iToken, lObjects): +def detect(oDataStructure): """ incomplete_type_declaration ::= type identifier ; """ - if utils.are_next_consecutive_tokens(["type", None, ";"], iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.are_next_consecutive_tokens(["type", None, ";"]): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/package_body.py b/vsg/vhdlFile/classify/package_body.py index 8c99b6b20..614c3d67c 100644 --- a/vsg/vhdlFile/classify/package_body.py +++ b/vsg/vhdlFile/classify/package_body.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import package_body_declarative_part -def detect(iToken, lObjects): +def detect(oDataStructure): """ package_body ::= package body *package*_simple_name is @@ -13,9 +13,10 @@ def detect(iToken, lObjects): end [ package body ] [ *package*_simple_name ] ; """ - if utils.are_next_consecutive_tokens(["package", "body", None, "is"], iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.are_next_consecutive_tokens(["package", "body", None, "is"]): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/package_declaration.py b/vsg/vhdlFile/classify/package_declaration.py index 43fb81a1a..5b6763a42 100644 --- a/vsg/vhdlFile/classify/package_declaration.py +++ b/vsg/vhdlFile/classify/package_declaration.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import package_declarative_part, package_header -def detect(iToken, lObjects): +def detect(oDataStructure): """ package_declaration ::= package identifier is @@ -14,15 +14,12 @@ def detect(iToken, lObjects): end [ package ] [ package_simple_name ] ; """ - iCurrent = utils.find_next_token(iToken, lObjects) - if utils.object_value_is(lObjects, iCurrent, "package"): - if not utils.find_in_next_n_tokens("body", 5, iCurrent, lObjects): - if not utils.find_in_next_n_tokens("new", 5, iCurrent, lObjects): - return classify(iToken, lObjects) - else: - return iToken - - return iToken + if oDataStructure.is_next_token("package"): + if not oDataStructure.find_in_next_n_tokens("body", 5): + if not oDataStructure.find_in_next_n_tokens("new", 5): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/package_instantiation_declaration.py b/vsg/vhdlFile/classify/package_instantiation_declaration.py index 2b6fa9032..6429f2fb9 100644 --- a/vsg/vhdlFile/classify/package_instantiation_declaration.py +++ b/vsg/vhdlFile/classify/package_instantiation_declaration.py @@ -5,16 +5,17 @@ from vsg.vhdlFile.classify import generic_map_aspect, identifier -def detect(iToken, lObjects): +def detect(oDataStructure): """ package_instantiation_declaration ::= package identifier is new *uninstantiated_package*_name [ generic_map_aspect ] ; """ - if utils.are_next_consecutive_tokens(["package", None, "is", "new"], iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.are_next_consecutive_tokens(["package", None, "is", "new"]): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/port_clause.py b/vsg/vhdlFile/classify/port_clause.py index 7cfbbe066..01f5f1207 100644 --- a/vsg/vhdlFile/classify/port_clause.py +++ b/vsg/vhdlFile/classify/port_clause.py @@ -5,24 +5,23 @@ from vsg.vhdlFile.classify import port_list -def detect(iToken, lObjects): +def detect(oDataStructure): """ port_clause ::= port ( port_list ) ; """ - if utils.are_next_consecutive_tokens(["port", "("], iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.are_next_consecutive_tokens(["port", "("]): + classify(oDataStructure) + return True + return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("port", token.port_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.port_keyword) + oDataStructure.replace_next_token_with(token.open_parenthesis) - iCurrent = port_list.classify(iCurrent, lObjects) + port_list.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(")", token.close_parenthesis) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/primary_unit.py b/vsg/vhdlFile/classify/primary_unit.py index 29494d94d..1b0d10a00 100644 --- a/vsg/vhdlFile/classify/primary_unit.py +++ b/vsg/vhdlFile/classify/primary_unit.py @@ -23,21 +23,13 @@ def detect(oDataStructure): if context_declaration.detect(oDataStructure): return True + if entity_declaration.detect(oDataStructure): + return True + + if package_declaration.detect(oDataStructure): + return True + + if package_instantiation_declaration.detect(oDataStructure): + return True -# iReturned = entity_declaration.detect(iToken, lObjects) -# if iReturned != iToken: -# return iReturned -# -# iReturned = package_declaration.detect(iToken, lObjects) -# if iReturned != iToken: -# return iReturned -# -# iReturned = package_instantiation_declaration.detect(iToken, lObjects) -# if iReturned != iToken: -# return iReturned -# -# iReturned = configuration_declaration.detect(iToken, lObjects) -# if iReturned != iToken: -# return iReturned -# -# return iToken + return configuration_declaration.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/procedure_specification.py b/vsg/vhdlFile/classify/procedure_specification.py index 86494a5d6..4f2f976c2 100644 --- a/vsg/vhdlFile/classify/procedure_specification.py +++ b/vsg/vhdlFile/classify/procedure_specification.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import formal_parameter_list, subprogram_header -def detect(iToken, lObjects): +def detect(oDataStructure): """ procedure_specification ::= procedure designator @@ -13,10 +13,11 @@ def detect(iToken, lObjects): [ [ parameter ] ( formal_parameter_list ) ] """ - if utils.is_next_token("procedure", iToken, lObjects): - if not utils.find_in_next_n_tokens("new", 4, iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token("procedure"): + if not oDataStructure.exists_in_next_n_tokens("new", 4): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/signal_declaration.py b/vsg/vhdlFile/classify/signal_declaration.py index 9d2b52db6..45ce5f9e8 100644 --- a/vsg/vhdlFile/classify/signal_declaration.py +++ b/vsg/vhdlFile/classify/signal_declaration.py @@ -10,16 +10,16 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ signal_declaration ::= signal identifier_list : subtype_indication [ signal_kind ] [ := expression ] ; """ - if utils.is_next_token("signal", iToken, lObjects): - return classify(iToken, lObjects) - - return iToken + if oDataStructure.is_next_token("signal"): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/subprogram_body.py b/vsg/vhdlFile/classify/subprogram_body.py index 2ca6a7e56..9755ce77f 100644 --- a/vsg/vhdlFile/classify/subprogram_body.py +++ b/vsg/vhdlFile/classify/subprogram_body.py @@ -9,7 +9,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ subprogram_body ::= subprogram_specification is @@ -19,9 +19,10 @@ def detect(iToken, lObjects): end [ subprogram_kind ] [ designator ] ; """ - if utils.is_next_token("is", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token("is"): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/subprogram_declaration.py b/vsg/vhdlFile/classify/subprogram_declaration.py index e8698862f..c866f309c 100644 --- a/vsg/vhdlFile/classify/subprogram_declaration.py +++ b/vsg/vhdlFile/classify/subprogram_declaration.py @@ -5,14 +5,13 @@ from vsg.vhdlFile.classify import subprogram_specification -def detect(iToken, lObjects): +def detect(oDataStructure): """ subprogram_declaration ::= subprogram_specification ; """ - iCurrent = subprogram_specification.detect(iToken, lObjects) - if iCurrent != iToken: - if utils.is_next_token(";", iCurrent, lObjects): - return utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - return iCurrent + if subprogram_specification.detect(oDataStructure): + oDataStructure.replace_next_token_required(";", token.semicolon) + return True + return False diff --git a/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py b/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py index fd44abd5b..65b0e6d6f 100644 --- a/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py +++ b/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py @@ -5,20 +5,19 @@ from vsg.vhdlFile.classify import generic_map_aspect, signature, subprogram_kind -def detect(iToken, lObjects): +def detect(oDataStructure): """ subprogram_instantiation_declaration ::= subprogram_kind identifier is new uninstantiated_subprogram_name [ signature ] [ generic_map_aspect ] ; """ - if subprogram_kind.detect(iToken, lObjects): - if utils.find_in_next_n_tokens("is", 3, iToken, lObjects): - if utils.find_in_next_n_tokens("new", 4, iToken, lObjects): - return classify(iToken, lObjects) - else: - return iToken - return iToken + if subprogram_kind.detect(oDataStructure): + if oDataStructure.find_in_next_n_tokens("is", 3): + if oDataStructure.find_in_next_n_tokens("new", 4): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/subprogram_kind.py b/vsg/vhdlFile/classify/subprogram_kind.py index 30ace8865..619eeed56 100644 --- a/vsg/vhdlFile/classify/subprogram_kind.py +++ b/vsg/vhdlFile/classify/subprogram_kind.py @@ -4,21 +4,19 @@ from vsg.vhdlFile import utils -def detect(iToken, lObjects): +def detect(oDataStructure): """ subprogram_kind ::= procedure | function """ - if utils.is_next_token("procedure", iToken, lObjects): + if oDataStructure.is_next_token("procedure"): return True - if utils.is_next_token("function", iToken, lObjects): + if oDataStructure.is_next_token("function"): return True return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_if("procedure", token.procedure_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("function", token.function_keyword, iToken, lObjects) - - return iCurrent +def classify(oDataStructure): + oDataStructure.replace_next_token_if("procedure", token.procedure_keyword) + oDataStructure.replace_next_token_if("function", token.function_keyword) diff --git a/vsg/vhdlFile/classify/subprogram_specification.py b/vsg/vhdlFile/classify/subprogram_specification.py index ed99433b7..bb9dfa017 100644 --- a/vsg/vhdlFile/classify/subprogram_specification.py +++ b/vsg/vhdlFile/classify/subprogram_specification.py @@ -3,19 +3,14 @@ from vsg.vhdlFile.classify import function_specification, procedure_specification -def detect(iCurrent, lObjects): +def detect(oDataStructure): """ subprogram_specification ::= procedure_specification | function_specification """ - iReturn = procedure_specification.detect(iCurrent, lObjects) - if iReturn != iCurrent: - return iReturn + if procedure_specification.detect(oDataStructure): + return True - iReturn = function_specification.detect(iCurrent, lObjects) - if iReturn != iCurrent: - return iReturn - - return iCurrent + return function_specification.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/subtype_declaration.py b/vsg/vhdlFile/classify/subtype_declaration.py index e8ca6b0af..45ea29f76 100644 --- a/vsg/vhdlFile/classify/subtype_declaration.py +++ b/vsg/vhdlFile/classify/subtype_declaration.py @@ -5,16 +5,16 @@ from vsg.vhdlFile.classify import identifier, subtype_indication -def detect(iToken, lObjects): +def detect(oDataStructure): """ subtype_declaration ::= subtype identifier is subtype_indication ; """ - if utils.is_next_token("subtype", iToken, lObjects): - return classify(iToken, lObjects) - - return iToken + if oDataStructure.is_next_token("subtype"): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/type_declaration.py b/vsg/vhdlFile/classify/type_declaration.py index c101d192c..5051c1d4b 100644 --- a/vsg/vhdlFile/classify/type_declaration.py +++ b/vsg/vhdlFile/classify/type_declaration.py @@ -4,19 +4,14 @@ from vsg.vhdlFile.classify import full_type_declaration, incomplete_type_declaration -def detect(iToken, lObjects): +def detect(oDataStructure): """ type_declaration ::= full_type_declaration | incomplete_type_declaration """ - iReturn = full_type_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if full_type_declaration.detect(oDataStructure): + return True - iReturn = incomplete_type_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn - - return iToken + return incomplete_type_declaration.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 2a7582afa..35f3cc9b8 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -13,9 +13,9 @@ def classify_selected_name(oDataStructure, token): oDataStructure.replace_current_token_with_list_of_tokens(lNewTokens) -def detect_production(oDesignFile, production): - while oDesignFile.advance_to_next_token(): - if not production.detect(oDesignFile): +def detect_production(oDataStructure, production): + while oDataStructure.advance_to_next_token(): + if not production.detect(oDataStructure): return False return False diff --git a/vsg/vhdlFile/classify/variable_declaration.py b/vsg/vhdlFile/classify/variable_declaration.py index fed300119..643adf1a9 100644 --- a/vsg/vhdlFile/classify/variable_declaration.py +++ b/vsg/vhdlFile/classify/variable_declaration.py @@ -5,18 +5,16 @@ from vsg.vhdlFile.classify import expression, identifier_list, subtype_indication -def detect(iToken, lObjects): +def detect(oDataStructure): """ variable_declaration ::= [ shared ] variable identifier_list : subtype_indication [ := expression ] ; """ - if utils.is_next_token("shared", iToken, lObjects): - return classify(iToken, lObjects) - elif utils.is_next_token("variable", iToken, lObjects): - return classify(iToken, lObjects) - - return iToken + if oDataStructure.is_next_token_one_of(["shared", "variable"]): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): From 155ae6e01a5f5bb6bf29846de87af711793c6c8e Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Tue, 4 Feb 2025 22:22:54 -0600 Subject: [PATCH 010/124] Classifying package_declaration. --- vsg/vhdlFile/classify/package_declaration.py | 39 +++------- .../classify/package_declarative_item.py | 78 +++++++------------ .../classify/package_declarative_part.py | 10 +-- vsg/vhdlFile/classify/package_header.py | 16 ++-- 4 files changed, 51 insertions(+), 92 deletions(-) diff --git a/vsg/vhdlFile/classify/package_declaration.py b/vsg/vhdlFile/classify/package_declaration.py index 5b6763a42..74c92a628 100644 --- a/vsg/vhdlFile/classify/package_declaration.py +++ b/vsg/vhdlFile/classify/package_declaration.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg.token import package_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import package_declarative_part, package_header @@ -15,37 +14,23 @@ def detect(oDataStructure): """ if oDataStructure.is_next_token("package"): - if not oDataStructure.find_in_next_n_tokens("body", 5): - if not oDataStructure.find_in_next_n_tokens("new", 5): + if not oDataStructure.exists_in_next_n_tokens("body", 5): + if not oDataStructure.exists_in_next_n_tokens("new", 5): classify(oDataStructure) return True return False -def classify(iToken, lObjects): - iCurrent = classify_opening_declaration(iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.package_keyword) + oDataStructure.replace_next_token_with(token.identifier) + oDataStructure.replace_next_token_required("is", token.is_keyword) - iCurrent = package_header.detect(iCurrent, lObjects) + package_header.detect(oDataStructure) - iCurrent = package_declarative_part.detect(iCurrent, lObjects) + package_declarative_part.detect(oDataStructure) - iCurrent = classify_closing_declaration(iCurrent, lObjects) - - return iCurrent - - -def classify_opening_declaration(iToken, lObjects): - iCurrent = utils.assign_next_token_required("package", token.package_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token(token.identifier, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iCurrent, lObjects) - - return iCurrent - - -def classify_closing_declaration(iToken, lObjects): - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("package", token.end_package_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.end_package_simple_name, iToken, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iToken, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_with_if("package", token.end_package_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.end_package_simple_name) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/package_declarative_item.py b/vsg/vhdlFile/classify/package_declarative_item.py index 1542615f7..58f00ce4d 100644 --- a/vsg/vhdlFile/classify/package_declarative_item.py +++ b/vsg/vhdlFile/classify/package_declarative_item.py @@ -19,7 +19,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ package_declarative_item ::= subprogram_declaration @@ -44,64 +44,46 @@ def detect(iToken, lObjects): | PSL_Sequence_Declaration """ - iReturn = subprogram_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if subprogram_declaration.detect(oDataStructure): + return True - iReturn = subprogram_instantiation_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if subprogram_instantiation_declaration.detect(oDataStructure): + return True - iReturn = package_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_declaration.detect(oDataStructure): + return True - iReturn = package_instantiation_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_instantiation_declaration.detect(oDataStructure): + return True - iReturn = type_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if type_declaration.detect(oDataStructure): + return True - iReturn = subtype_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if subtype_declaration.detect(oDataStructure): + return True - iReturn = constant_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if constant_declaration.detect(oDataStructure): + return True - iReturn = signal_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if signal_declaration.detect(oDataStructure): + return True - iReturn = variable_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if variable_declaration.detect(oDataStructure): + return True - iReturn = file_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if file_declaration.detect(oDataStructure): + return True - iReturn = alias_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if alias_declaration.detect(oDataStructure): + return True - iReturn = component_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if component_declaration.detect(oDataStructure): + return True - iReturn = attribute_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if attribute_declaration.detect(oDataStructure): + return True - iReturn = attribute_specification.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if attribute_specification.detect(oDataStructure): + return True - iReturn = use_clause.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn - - return iToken + return use_clause.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/package_declarative_part.py b/vsg/vhdlFile/classify/package_declarative_part.py index 812af63a2..a773fb0c8 100644 --- a/vsg/vhdlFile/classify/package_declarative_part.py +++ b/vsg/vhdlFile/classify/package_declarative_part.py @@ -3,15 +3,11 @@ from vsg.vhdlFile.classify import package_declarative_item -def detect(iToken, lObjects): +def detect(oDataStructure): """ package_declarative_part ::= { package_declarative_item } """ - iLast = 0 - iCurrent = iToken - while iLast != iCurrent: - iLast = iCurrent - iCurrent = package_declarative_item.detect(iCurrent, lObjects) - return iCurrent + while package_declarative_item.detect(oDataStructure): + pass diff --git a/vsg/vhdlFile/classify/package_header.py b/vsg/vhdlFile/classify/package_header.py index 744dd2240..f10b64173 100644 --- a/vsg/vhdlFile/classify/package_header.py +++ b/vsg/vhdlFile/classify/package_header.py @@ -1,22 +1,18 @@ # -*- coding: utf-8 -*- from vsg.token import package_header as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_clause, generic_map_aspect -def detect(iToken, lObjects): +def detect(oDataStructure): """ package_header ::= [ generic_clause [ generic_map_aspect ; ] ] """ - iCurrent = generic_clause.detect(iToken, lObjects) - - iLast = iCurrent - iCurrent = generic_map_aspect.detect(iCurrent, lObjects) - if iCurrent != iLast: - return utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iToken + if generic_clause.detect(oDataStructure): + if generic_map_aspect.detect(oDataStructure): + oDataStructure.assign_next_token_required(";", token.semicolon) + return True + return False From bedd02f7aab3de211c95c9ad96ec5ae2fa89128a Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 5 Feb 2025 21:10:17 -0600 Subject: [PATCH 011/124] Parsing package_instantiation_declaration. --- vsg/data_structure.py | 46 ++++++++++++++++- vsg/vhdlFile/classify/association_element.py | 49 +++++++++---------- vsg/vhdlFile/classify/association_list.py | 13 ++--- vsg/vhdlFile/classify/formal_part.py | 10 ++-- vsg/vhdlFile/classify/generic_map_aspect.py | 24 +++++---- vsg/vhdlFile/classify/identifier.py | 5 +- .../package_instantiation_declaration.py | 20 +++----- 7 files changed, 97 insertions(+), 70 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index b412cb1a0..210d73493 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from vsg import parser +from vsg.vhdlFile import utils def New(lAllObjects): @@ -9,27 +10,46 @@ def New(lAllObjects): class design_file: def __init__(self, lAllObjects): self.lAllObjects = lAllObjects + self.sFilename = "" self.iCurrent = 0 self.iSeek = 0 + self.iLine = 1 def advance_to_next_token(self): for iIndex, oToken in enumerate(self.lAllObjects[self.iCurrent : :]): + if type(oToken) == parser.carriage_return: + self.iLine += 1 if type(oToken) == parser.item: self.iCurrent = self.iCurrent + iIndex return True return False + def advance_to_next_seek_token(self): + for iIndex, oToken in enumerate(self.lAllObjects[self.iSeek : :]): + if type(oToken) == parser.item: + self.iSeek = self.iSeek + iIndex + return True + return False + + def align_seek_index(self): + self.iSeek = self.iCurrent + def are_next_consecutive_tokens(self, lTokens): + self.align_seek_index() for sToken in lTokens: self.seek_to_next_token() if sToken is not None: if not self.seek_token_lower_value_is(sToken): return False + self.increment_seek_index() return True def current_token_lower_value_is(self, sString): return self.get_current_token_lower_value() == sString + def seek_token_lower_value_is(self, sString): + return self.get_seek_token_lower_value() == sString + def does_string_exist_before_string(self, sFirst, sSecond): for oToken in self.lAllObjects[self.iCurrent : :]: if oToken.lower_value == sSecond: @@ -38,10 +58,12 @@ def does_string_exist_before_string(self, sFirst, sSecond): return True def exists_in_next_n_tokens(self, sString, iNumTokens): + self.iSeek = self.iCurrent for x in range(0, iNumTokens): self.seek_to_next_token() if self.seek_token_lower_value_is(sString): return True + self.increment_seek_index() return False def get_current_index(self): @@ -56,12 +78,22 @@ def get_current_token_value(self): def get_next_token_value(self): return self.lAllObjects[self.iCurrent + 1].get_value() + def get_seek_index(self): + return self.iSeek + def get_seek_token_lower_value(self): return self.lAllObjects[self.iSeek].lower_value def increment_current_index(self): self.iCurrent += 1 + def increment_seek_index(self): + self.iSeek += 1 + + def is_next_seek_token(self, sString): + self.advance_to_next_seek_token() + return self.current_token_lower_value_is(sString) + def is_next_token(self, sString): self.advance_to_next_token() return self.current_token_lower_value_is(sString) @@ -85,7 +117,7 @@ def replace_next_token_required(self, sToken, token): if self.is_next_token(sToken): self.replace_current_token_with(token) else: - print_error_message(sToken, token, oDesignFile) + utils.print_error_message(sToken, token, self) def replace_next_token_with(self, token): self.advance_to_next_token() @@ -101,6 +133,18 @@ def replace_next_token_with_if_not(self, sString, token): if not self.current_token_lower_value_is(sString): self.replace_current_token_with(token) + def replace_tokens_from_current_to_seek_with(self, token): + self.reverse_to_previous_seek_token() + while self.get_current_index() < self.get_seek_index(): + self.replace_next_token_with(token) + + def reverse_to_previous_seek_token(self): + for iIndex in range(self.iSeek - 1, self.iCurrent, -1): + if type(self.lAllObjects[iIndex]) == parser.item: + self.iSeek = iIndex + return True + return False + def seek_to_next_token(self): # jcl - might need to watch out for going past the end of the lAllObjects list if self.iSeek < self.iCurrent: diff --git a/vsg/vhdlFile/classify/association_element.py b/vsg/vhdlFile/classify/association_element.py index 1709f0f8c..7005ebd1f 100644 --- a/vsg/vhdlFile/classify/association_element.py +++ b/vsg/vhdlFile/classify/association_element.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import formal_part -def detect(iCurrent, lObjects): +def detect(oDataStructure): """ association_element ::= [ formal_part => ] actual_part @@ -17,43 +17,38 @@ def detect(iCurrent, lObjects): """ iOpenParenthesis = 0 iCloseParenthesis = 0 - iToken = iCurrent - while not utils.token_is_semicolon(iToken, lObjects): - iToken = utils.find_next_token(iToken, lObjects) - if utils.token_is_open_parenthesis(iToken, lObjects): + oDataStructure.align_seek_index() + while not oDataStructure.is_next_seek_token(";"): + oDataStructure.advance_to_next_seek_token() + if oDataStructure.seek_token_lower_value_is("("): iOpenParenthesis += 1 - if utils.token_is_close_parenthesis(iToken, lObjects): + if oDataStructure.seek_token_lower_value_is(")"): iCloseParenthesis += 1 if iCloseParenthesis == iOpenParenthesis + 1: - classify(iCurrent, iToken, lObjects, ")") - return iToken + classify(oDataStructure, ")") + return True if iCloseParenthesis == iOpenParenthesis: - if utils.token_is_comma(iToken, lObjects): - classify(iCurrent, iToken, lObjects, ",") - return iToken - iToken += 1 - return iToken + if oDataStructure.seek_token_lower_value_is(","): + classify(oDataStructure, ",") + return True + oDataStructure.increment_seek_index() + return False -def classify(iStart, iEnd, lObjects, sEnd): - iCurrent = iStart +def classify(oDataStructure, sEnd): # Classify formal part if it exists - if formal_part_detected(iStart, iEnd, lObjects): - iCurrent = formal_part.classify(token.formal_part, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("=>", token.assignment, iCurrent, lObjects) + if formal_part_detected(oDataStructure): + formal_part.classify(oDataStructure, token.formal_part) + oDataStructure.replace_next_token_with(token.assignment) # Classify actual part - for iCurrent in range(iCurrent, iEnd): - if utils.is_item(lObjects, iCurrent): - utils.assign_token(lObjects, iCurrent, token.actual_part) - - return iCurrent + oDataStructure.replace_tokens_from_current_to_seek_with(token.actual_part) -def formal_part_detected(iStart, iEnd, lObjects): +def formal_part_detected(oDataStructure): iParen = 0 - for iIndex in range(iStart, iEnd): - iParen = utils.update_paren_counter(iIndex, lObjects, iParen) - if iParen == 0 and utils.object_value_is(lObjects, iIndex, "=>"): + for iIndex in range(oDataStructure.get_current_index(), oDataStructure.get_seek_index()): + iParen = utils.update_paren_counter(iIndex, oDataStructure.lAllObjects, iParen) + if iParen == 0 and utils.object_value_is(oDataStructure.lAllObjects, iIndex, "=>"): return True return False diff --git a/vsg/vhdlFile/classify/association_list.py b/vsg/vhdlFile/classify/association_list.py index bc3d38f80..5c6a4a60e 100644 --- a/vsg/vhdlFile/classify/association_list.py +++ b/vsg/vhdlFile/classify/association_list.py @@ -1,19 +1,16 @@ # -*- coding: utf-8 -*- from vsg.token import association_list as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import association_element -def classify(iToken, lObjects): +def classify(oDataStructure): """ association_list ::= association_element { , association_element } """ - iCurrent = association_element.detect(iToken, lObjects) + association_element.detect(oDataStructure) - while utils.is_next_token(",", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(",", token.comma, iCurrent, lObjects) - iCurrent = association_element.detect(iCurrent, lObjects) - - return iCurrent + while oDataStructure.is_next_token(","): + oDataStructure.replace_next_token_with(token.comma) + association_element.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/formal_part.py b/vsg/vhdlFile/classify/formal_part.py index 99668db0c..d169c791b 100644 --- a/vsg/vhdlFile/classify/formal_part.py +++ b/vsg/vhdlFile/classify/formal_part.py @@ -4,7 +4,7 @@ from vsg.vhdlFile import utils -def classify(oTokenType, iToken, lObjects): +def classify(oDataStructure, oTokenType): """ formal_part ::= formal_designator @@ -14,10 +14,8 @@ def classify(oTokenType, iToken, lObjects): An association element will end with => """ # Assign first token as formal part - iCurrent = utils.assign_next_token(oTokenType, iToken, lObjects) + oDataStructure.replace_next_token_with(oTokenType) # Assign remaining tokens as todo - while not utils.are_next_consecutive_tokens_ignoring_whitespace(["=>"], iCurrent, lObjects): - iCurrent = utils.assign_next_token(parser.todo, iCurrent, lObjects) - - return iCurrent + while not oDataStructure.is_next_token("=>"): + oDataStructure.replace_next_token_with(parser.todo) diff --git a/vsg/vhdlFile/classify/generic_map_aspect.py b/vsg/vhdlFile/classify/generic_map_aspect.py index 9951af3c6..c3ecfddb9 100644 --- a/vsg/vhdlFile/classify/generic_map_aspect.py +++ b/vsg/vhdlFile/classify/generic_map_aspect.py @@ -1,27 +1,25 @@ # -*- coding: utf-8 -*- from vsg.token import generic_map_aspect as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import association_list -def detect(iToken, lObjects): +def detect(oDataStructure): """ generic_map_aspect ::= generic map ( *generic*_association_list ) """ - if utils.is_next_token("generic", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token("generic"): + classify(oDataStructure) + return True + return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_if("generic", token.generic_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("map", token.map_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if("(", token.open_parenthesis, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.generic_keyword) + oDataStructure.replace_next_token_required("map", token.map_keyword) + oDataStructure.replace_next_token_required("(", token.open_parenthesis) - iCurrent = association_list.classify(iCurrent, lObjects) + association_list.classify(oDataStructure) - iCurrent = utils.assign_next_token_if(")", token.close_parenthesis, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(")", token.close_parenthesis) diff --git a/vsg/vhdlFile/classify/identifier.py b/vsg/vhdlFile/classify/identifier.py index cfc1d78c6..2b68d388e 100644 --- a/vsg/vhdlFile/classify/identifier.py +++ b/vsg/vhdlFile/classify/identifier.py @@ -1,13 +1,12 @@ # -*- coding: utf-8 -*- from vsg.token import identifier as token -from vsg.vhdlFile import utils -def classify(iToken, lObjects, oType=token.identifier): +def classify(oDataStructure, oType=token.identifier): """ identifier ::= basic_identifier | extended_identifier """ - return utils.assign_next_token(oType, iToken, lObjects) + oDataStructure.replace_next_token_with(oType) diff --git a/vsg/vhdlFile/classify/package_instantiation_declaration.py b/vsg/vhdlFile/classify/package_instantiation_declaration.py index 6429f2fb9..f4162e053 100644 --- a/vsg/vhdlFile/classify/package_instantiation_declaration.py +++ b/vsg/vhdlFile/classify/package_instantiation_declaration.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg.token import package_instantiation_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_map_aspect, identifier @@ -11,24 +10,21 @@ def detect(oDataStructure): package identifier is new *uninstantiated_package*_name [ generic_map_aspect ] ; """ - if oDataStructure.are_next_consecutive_tokens(["package", None, "is", "new"]): classify(oDataStructure) return True return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("package", token.package_keyword, iToken, lObjects) - - iCurrent = identifier.classify(iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("package", token.package_keyword) - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("new", token.new_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.uninstantiated_package_name, iCurrent, lObjects) + identifier.classify(oDataStructure) - iCurrent = generic_map_aspect.detect(iCurrent, lObjects) + oDataStructure.replace_next_token_required("is", token.is_keyword) + oDataStructure.replace_next_token_required("new", token.new_keyword) + oDataStructure.replace_next_token_with(token.uninstantiated_package_name) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + generic_map_aspect.detect(oDataStructure) - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) From 6895f50e26511a3836702db1e4c22ac172335b1a Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 5 Feb 2025 21:43:52 -0600 Subject: [PATCH 012/124] Refactoring to improve readability. --- vsg/data_structure.py | 14 +++++-- vsg/vhdlFile/classify/association_element.py | 42 +++++++++----------- vsg/vhdlFile/classify/formal_part.py | 1 - 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 210d73493..eacbb0320 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -13,12 +13,9 @@ def __init__(self, lAllObjects): self.sFilename = "" self.iCurrent = 0 self.iSeek = 0 - self.iLine = 1 def advance_to_next_token(self): for iIndex, oToken in enumerate(self.lAllObjects[self.iCurrent : :]): - if type(oToken) == parser.carriage_return: - self.iLine += 1 if type(oToken) == parser.item: self.iCurrent = self.iCurrent + iIndex return True @@ -57,6 +54,17 @@ def does_string_exist_before_string(self, sFirst, sSecond): if oToken.lower_value == sFirst: return True + def does_string_exist_before_seek_index(self, sString): + iParen = 0 + for iIndex in range(self.get_current_index(), self.get_seek_index()): + if self.lAllObjects[iIndex].lower_value == "(": + iParen += 1 + if self.lAllObjects[iIndex].lower_value == ")": + iParen -= 1 + if iParen == 0 and self.lAllObjects[iIndex].lower_value == sString: + return True + return False + def exists_in_next_n_tokens(self, sString, iNumTokens): self.iSeek = self.iCurrent for x in range(0, iNumTokens): diff --git a/vsg/vhdlFile/classify/association_element.py b/vsg/vhdlFile/classify/association_element.py index 7005ebd1f..236bf0571 100644 --- a/vsg/vhdlFile/classify/association_element.py +++ b/vsg/vhdlFile/classify/association_element.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg.token import association_element as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import formal_part @@ -15,40 +14,35 @@ def detect(oDataStructure): association_element [)|,] """ - iOpenParenthesis = 0 - iCloseParenthesis = 0 + iParen = 1 oDataStructure.align_seek_index() while not oDataStructure.is_next_seek_token(";"): oDataStructure.advance_to_next_seek_token() if oDataStructure.seek_token_lower_value_is("("): - iOpenParenthesis += 1 - if oDataStructure.seek_token_lower_value_is(")"): - iCloseParenthesis += 1 - if iCloseParenthesis == iOpenParenthesis + 1: - classify(oDataStructure, ")") - return True - if iCloseParenthesis == iOpenParenthesis: + iParen += 1 + elif oDataStructure.seek_token_lower_value_is(")"): + if iParen == 1: + classify(oDataStructure) + return True + iParen -= 1 + if iParen == 1: if oDataStructure.seek_token_lower_value_is(","): - classify(oDataStructure, ",") + classify(oDataStructure) return True oDataStructure.increment_seek_index() return False -def classify(oDataStructure, sEnd): - # Classify formal part if it exists - if formal_part_detected(oDataStructure): +def classify(oDataStructure): + classify_formal_part(oDataStructure) + classify_actual_part(oDataStructure) + + +def classify_formal_part(oDataStructure): + if oDataStructure.does_string_exist_before_seek_index("=>"): formal_part.classify(oDataStructure, token.formal_part) oDataStructure.replace_next_token_with(token.assignment) - # Classify actual part - oDataStructure.replace_tokens_from_current_to_seek_with(token.actual_part) - -def formal_part_detected(oDataStructure): - iParen = 0 - for iIndex in range(oDataStructure.get_current_index(), oDataStructure.get_seek_index()): - iParen = utils.update_paren_counter(iIndex, oDataStructure.lAllObjects, iParen) - if iParen == 0 and utils.object_value_is(oDataStructure.lAllObjects, iIndex, "=>"): - return True - return False +def classify_actual_part(oDataStructure): + oDataStructure.replace_tokens_from_current_to_seek_with(token.actual_part) diff --git a/vsg/vhdlFile/classify/formal_part.py b/vsg/vhdlFile/classify/formal_part.py index d169c791b..6d8da17c2 100644 --- a/vsg/vhdlFile/classify/formal_part.py +++ b/vsg/vhdlFile/classify/formal_part.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg import parser -from vsg.vhdlFile import utils def classify(oDataStructure, oTokenType): From c6174c2b787735a33a0c312accc363ef308c75c2 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 5 Feb 2025 21:45:59 -0600 Subject: [PATCH 013/124] Refactoring to improve readability. --- vsg/data_structure.py | 4 ++-- vsg/vhdlFile/classify/association_element.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index eacbb0320..d8283a53b 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -54,12 +54,12 @@ def does_string_exist_before_string(self, sFirst, sSecond): if oToken.lower_value == sFirst: return True - def does_string_exist_before_seek_index(self, sString): + def does_string_exist_before_seek_index_honoring_parenthesis_hierarchy(self, sString): iParen = 0 for iIndex in range(self.get_current_index(), self.get_seek_index()): if self.lAllObjects[iIndex].lower_value == "(": iParen += 1 - if self.lAllObjects[iIndex].lower_value == ")": + elif self.lAllObjects[iIndex].lower_value == ")": iParen -= 1 if iParen == 0 and self.lAllObjects[iIndex].lower_value == sString: return True diff --git a/vsg/vhdlFile/classify/association_element.py b/vsg/vhdlFile/classify/association_element.py index 236bf0571..107d931d6 100644 --- a/vsg/vhdlFile/classify/association_element.py +++ b/vsg/vhdlFile/classify/association_element.py @@ -39,7 +39,7 @@ def classify(oDataStructure): def classify_formal_part(oDataStructure): - if oDataStructure.does_string_exist_before_seek_index("=>"): + if oDataStructure.does_string_exist_before_seek_index_honoring_parenthesis_hierarchy("=>"): formal_part.classify(oDataStructure, token.formal_part) oDataStructure.replace_next_token_with(token.assignment) From ab72a9d5cf6ce05faebc027c8eb3da60bac6ab5e Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 5 Feb 2025 22:00:39 -0600 Subject: [PATCH 014/124] Parsing configuration_declaration. --- vsg/vhdlFile/classify/block_configuration.py | 32 +++++++-------- .../classify/configuration_declaration.py | 39 ++++++++----------- .../configuration_declarative_item.py | 18 +++------ .../configuration_declarative_part.py | 10 ++--- vsg/vhdlFile/classify/group_declaration.py | 29 +++++++------- 5 files changed, 55 insertions(+), 73 deletions(-) diff --git a/vsg/vhdlFile/classify/block_configuration.py b/vsg/vhdlFile/classify/block_configuration.py index 16309c543..c4ae013b2 100644 --- a/vsg/vhdlFile/classify/block_configuration.py +++ b/vsg/vhdlFile/classify/block_configuration.py @@ -1,16 +1,15 @@ # -*- coding: utf-8 -*- from vsg.token import block_configuration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( block_specification, configuration_item, use_clause, - utils as c_utils, + utils, ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ block_configuration ::= for block_specification @@ -19,22 +18,21 @@ def detect(iToken, lObjects): end for ; """ - if utils.is_next_token("for", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token("for"): + classify(oDataStructure) + return True + return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("for", token.for_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.for_keyword) - iCurrent = block_specification.classify(iCurrent, lObjects) + block_specification.classify(oDataStructure) - iCurrent = c_utils.classify_production(use_clause, iCurrent, lObjects) - iCurrent = c_utils.classify_production(configuration_item, iCurrent, lObjects) + utils.classify_production(use_clause, oDataStructure) + utils.classify_production(configuration_item, oDataStructure) - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("for", token.end_for_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.unspecified, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("end", token.end_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("for", token.end_for_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_with_if_not(";", token.unspecified, iCurrent, lObjects) + oDataStructure.replace_next_token_required(";", token.semicolon, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/configuration_declaration.py b/vsg/vhdlFile/classify/configuration_declaration.py index 34c039f65..d614c0ca8 100644 --- a/vsg/vhdlFile/classify/configuration_declaration.py +++ b/vsg/vhdlFile/classify/configuration_declaration.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg.token import configuration_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import block_configuration, configuration_declarative_part @@ -21,32 +20,26 @@ def detect(oDataStructure): return False -def classify(iToken, lObjects): - iCurrent = classify_opening_declaration(iToken, lObjects) +def classify(oDataStructure): + classify_opening_declaration(oDataStructure) - iCurrent = configuration_declarative_part.detect(iCurrent, lObjects) + configuration_declarative_part.detect(oDataStructure) - iCurrent = block_configuration.detect(iCurrent, lObjects) + block_configuration.detect(oDataStructure) - iCurrent = classify_closing_declaration(iToken, lObjects) + classify_closing_declaration(oDataStructure) - return iCurrent +def classify_opening_declaration(oDataStructure): + oDataStructure.replace_next_token_with(token.configuration_keyword) + oDataStructure.replace_next_token_with(token.identifier) + oDataStructure.replace_next_token_required("of", token.of_keyword) + oDataStructure.replace_next_token_with(token.entity_name) + oDataStructure.replace_next_token_required("is", token.is_keyword) -def classify_opening_declaration(iToken, lObjects): - iCurrent = utils.assign_next_token_required("configuration", token.configuration_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token(token.identifier, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("of", token.of_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.entity_name, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iCurrent, lObjects) - return iCurrent - - -def classify_closing_declaration(iToken, lObjects): - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("configuration", token.end_configuration_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.configuration_simple_name, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent +def classify_closing_declaration(oDataStructure): + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_if("configuration", token.end_configuration_keyword) + oDataStructure.replace_next_token_if_not(";", token.configuration_simple_name) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/configuration_declarative_item.py b/vsg/vhdlFile/classify/configuration_declarative_item.py index e806d9323..a122e4e1f 100644 --- a/vsg/vhdlFile/classify/configuration_declarative_item.py +++ b/vsg/vhdlFile/classify/configuration_declarative_item.py @@ -3,7 +3,7 @@ from vsg.vhdlFile.classify import attribute_specification, group_declaration, use_clause -def detect(iToken, lObjects): +def detect(oDataStructure): """ configuration_declarative_item ::= use_clause @@ -11,16 +11,10 @@ def detect(iToken, lObjects): | group_declaration """ - iReturn = use_clause.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if use_clause.detect(oDataStructure): + return True - iReturn = attribute_specification.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if attribute_specification.detect(oDataStructure): + return True - iReturn = group_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn - - return iToken + return group_declaration.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/configuration_declarative_part.py b/vsg/vhdlFile/classify/configuration_declarative_part.py index cdf999cf5..9b2c91862 100644 --- a/vsg/vhdlFile/classify/configuration_declarative_part.py +++ b/vsg/vhdlFile/classify/configuration_declarative_part.py @@ -3,15 +3,11 @@ from vsg.vhdlFile.classify import configuration_declarative_item -def detect(iToken, lObjects): +def detect(oDataStructure): """ configuration_declarative_part ::= { configuration_declarative_item } """ - iLast = 0 - iCurrent = iToken - while iLast != iCurrent: - iLast = iCurrent - iCurrent = configuration_declarative_item.detect(iCurrent, lObjects) - return iCurrent + while configuration_declarative_item.detect(oDataStructure): + pass diff --git a/vsg/vhdlFile/classify/group_declaration.py b/vsg/vhdlFile/classify/group_declaration.py index 239f917b3..69fa54603 100644 --- a/vsg/vhdlFile/classify/group_declaration.py +++ b/vsg/vhdlFile/classify/group_declaration.py @@ -5,25 +5,26 @@ from vsg.vhdlFile.classify import group_constituent_list -def detect(iToken, lObjects): +def detect(oDataStructure): """ group_declaration ::= group identifier : group_template_name ( group_constituent_list ) ; """ - if utils.is_next_token("group", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token("group"): + classify(oDataStructure) + return True + return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("group", token.group_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token(token.identifier, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.group_template_name, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) - iCurrent = group_constituent_list.classify(iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with("group", token.group_keyword, iToken, lObjects) + oDataStructure.replace_next_token_with(token.identifier, iCurrent, lObjects) + oDataStructure.replace_next_token_required(":", token.colon, iCurrent, lObjects) + oDataStructure.replace_next_token_with(token.group_template_name, iCurrent, lObjects) + oDataStructure.replace_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) - return iCurrent + group_constituent_list.classify(oDataStructure) + + oDataStructure.replace_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) + oDataStructure.replace_next_token_required(";", token.semicolon, iCurrent, lObjects) From 15b8c229be6f5c8406f6167dd6409168b942d863 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 5 Feb 2025 22:11:34 -0600 Subject: [PATCH 015/124] Refactoring. --- vsg/vhdlFile/classify/block_configuration.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/vsg/vhdlFile/classify/block_configuration.py b/vsg/vhdlFile/classify/block_configuration.py index c4ae013b2..982d1b87b 100644 --- a/vsg/vhdlFile/classify/block_configuration.py +++ b/vsg/vhdlFile/classify/block_configuration.py @@ -1,12 +1,7 @@ # -*- coding: utf-8 -*- from vsg.token import block_configuration as token -from vsg.vhdlFile.classify import ( - block_specification, - configuration_item, - use_clause, - utils, -) +from vsg.vhdlFile.classify import block_specification, configuration_item, use_clause def detect(oDataStructure): @@ -29,8 +24,8 @@ def classify(oDataStructure): block_specification.classify(oDataStructure) - utils.classify_production(use_clause, oDataStructure) - utils.classify_production(configuration_item, oDataStructure) + use_clause.detect(oDataStructure) + configuration_item.detect(oDataStructure) oDataStructure.replace_next_token_required("end", token.end_keyword, iCurrent, lObjects) oDataStructure.replace_next_token_required("for", token.end_for_keyword, iCurrent, lObjects) From 202e4d8933fe9145b5e053fba82953aed1e15ce4 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 6 Feb 2025 21:14:29 -0600 Subject: [PATCH 016/124] Parsing architecture_body. --- vsg/data_structure.py | 12 +++ vsg/vhdlFile/classify/architecture_body.py | 51 +++++------ .../classify/architecture_declarative_part.py | 5 +- .../classify/architecture_statement_part.py | 6 +- .../classify/block_declarative_item.py | 89 +++++++------------ vsg/vhdlFile/classify/block_statement.py | 9 +- .../classify/case_generate_statement.py | 11 +-- .../component_instantiation_statement.py | 17 ++-- .../concurrent_assertion_statement.py | 9 +- ...oncurrent_conditional_signal_assignment.py | 33 +++---- .../concurrent_procedure_call_statement.py | 8 +- .../concurrent_selected_signal_assignment.py | 6 +- .../concurrent_signal_assignment_statement.py | 32 +++---- .../concurrent_simple_signal_assignment.py | 12 +-- vsg/vhdlFile/classify/concurrent_statement.py | 38 +++----- .../classify/configuration_specification.py | 8 +- .../classify/for_generate_statement.py | 11 +-- vsg/vhdlFile/classify/generate_statement.py | 18 ++-- .../classify/if_generate_statement.py | 11 +-- vsg/vhdlFile/classify/library_unit.py | 7 +- vsg/vhdlFile/classify/procedure_call.py | 16 ++-- vsg/vhdlFile/classify/process_statement.py | 11 +-- vsg/vhdlFile/classify/secondary_unit.py | 13 +-- .../simple_configuration_specification.py | 30 +++---- 24 files changed, 211 insertions(+), 252 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index d8283a53b..46c398ecd 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -54,6 +54,18 @@ def does_string_exist_before_string(self, sFirst, sSecond): if oToken.lower_value == sFirst: return True + def does_string_exist_before_string_honoring_parenthesis_hierarchy(self, sFirst, sSecond): + iParen = 0 + for oToken in self.lAllObjects[self.iCurrent : :]: + if oToken.lower_value == sSecond: + return False + if oToken.lower_value == "(": + iParen += 1 + elif oToken.lower_value == ")": + iParen -= 1 + if iParen == 0 and oToken.lower_value == sFirst: + return True + def does_string_exist_before_seek_index_honoring_parenthesis_hierarchy(self, sString): iParen = 0 for iIndex in range(self.get_current_index(), self.get_seek_index()): diff --git a/vsg/vhdlFile/classify/architecture_body.py b/vsg/vhdlFile/classify/architecture_body.py index 77d184d4a..7687ccb5b 100644 --- a/vsg/vhdlFile/classify/architecture_body.py +++ b/vsg/vhdlFile/classify/architecture_body.py @@ -1,14 +1,13 @@ # -*- coding: utf-8 -*- from vsg.token import architecture_body as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( architecture_declarative_part, architecture_statement_part, ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ architecture identifier of *entity*_name is architecture_declarative_part @@ -17,39 +16,35 @@ def detect(iToken, lObjects): end [ architecture ] [ *architecture*_simple_name ] ; """ - if utils.is_next_token("architecture", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token("architecture"): + classify(oDataStructure) + return True + return False -def classify(iToken, lObjects): - iCurrent = classify_opening_declaration(iToken, lObjects) +def classify(oDataStructure): + classify_opening_declaration(oDataStructure) - iCurrent = architecture_declarative_part.detect(iCurrent, lObjects) + architecture_declarative_part.detect(oDataStructure) - iCurrent = utils.assign_next_token_required("begin", token.begin_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("begin", token.begin_keyword) - iCurrent = architecture_statement_part.classify_until(["end"], iCurrent, lObjects) + #architecture_statement_part.classify_until(["end"]) + architecture_statement_part.detect(oDataStructure) - iCurrent = classify_closing_declaration(iToken, lObjects) + classify_closing_declaration(oDataStructure) - return iCurrent +def classify_opening_declaration(oDataStructure): + oDataStructure.replace_next_token_with(token.architecture_keyword) + oDataStructure.replace_next_token_with(token.identifier) + oDataStructure.replace_next_token_required("of", token.of_keyword) + oDataStructure.replace_next_token_with(token.entity_name) + oDataStructure.replace_next_token_required("is", token.is_keyword) -def classify_opening_declaration(iToken, lObjects): - iCurrent = utils.assign_next_token_required("architecture", token.architecture_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token(token.identifier, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("of", token.of_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.entity_name, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iCurrent, lObjects) - return iCurrent - - -def classify_closing_declaration(iToken, lObjects): - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("architecture", token.end_architecture_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.architecture_simple_name, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent +def classify_closing_declaration(oDataStructure): + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_with_if("architecture", token.end_architecture_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.architecture_simple_name) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/architecture_declarative_part.py b/vsg/vhdlFile/classify/architecture_declarative_part.py index 05282a46a..99f7dd5ae 100644 --- a/vsg/vhdlFile/classify/architecture_declarative_part.py +++ b/vsg/vhdlFile/classify/architecture_declarative_part.py @@ -4,10 +4,11 @@ from vsg.vhdlFile.classify import block_declarative_item -def detect(iToken, lObjects): +def detect(oDataStructure): """ architecture_declarative_part ::= { block_declarative_item } """ - return utils.detect_submodule(iToken, lObjects, block_declarative_item) + while block_declarative_item.detect(oDataStructure): + pass diff --git a/vsg/vhdlFile/classify/architecture_statement_part.py b/vsg/vhdlFile/classify/architecture_statement_part.py index 67e7acf28..29aba472e 100644 --- a/vsg/vhdlFile/classify/architecture_statement_part.py +++ b/vsg/vhdlFile/classify/architecture_statement_part.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import concurrent_statement -def classify_until(lUntils, iToken, lObjects): +def detect(oDataStructure): """ architecture_statement_part ::= { concurrent_statement } """ - return utils.detect_subelement_until(lUntils[0], concurrent_statement, iToken, lObjects) + while concurrent_statement.detect(oDataStructure): + pass diff --git a/vsg/vhdlFile/classify/block_declarative_item.py b/vsg/vhdlFile/classify/block_declarative_item.py index c2772001c..341cdceb0 100644 --- a/vsg/vhdlFile/classify/block_declarative_item.py +++ b/vsg/vhdlFile/classify/block_declarative_item.py @@ -22,7 +22,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ block_declarative_item ::= subprogram_declaration @@ -51,73 +51,52 @@ def detect(iToken, lObjects): | PSL_Clock_Declaration """ - iReturn = subprogram_declaration.detect(iToken, lObjects) - if iReturn != iToken: - iReturn = subprogram_body.detect(iReturn, lObjects) - return iReturn + if subprogram_declaration.detect(oDataStructure): + return subprogram_body.detect(iReturn, lObjects) - iReturn = subprogram_instantiation_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if subprogram_instantiation_declaration.detect(oDataStructure): + return True - iReturn = package_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_declaration.detect(oDataStructure): + return True - iReturn = package_body.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_body.detect(oDataStructure): + return True - iReturn = package_instantiation_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_instantiation_declaration.detect(oDataStructure): + return True - iReturn = type_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if type_declaration.detect(oDataStructure): + return True - iReturn = subtype_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if subtype_declaration.detect(oDataStructure): + return True - iReturn = constant_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if constant_declaration.detect(oDataStructure): + return True - iReturn = signal_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if signal_declaration.detect(oDataStructure): + return True - iReturn = variable_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if variable_declaration.detect(oDataStructure): + return True - iReturn = file_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if file_declaration.detect(oDataStructure): + return True - iReturn = alias_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if alias_declaration.detect(oDataStructure): + return True - iReturn = component_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if component_declaration.detect(oDataStructure): + return True - iReturn = attribute_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if attribute_declaration.detect(oDataStructure): + return True - iReturn = attribute_specification.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if attribute_specification.detect(oDataStructure): + return True - iReturn = use_clause.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if use_clause.detect(oDataStructure): + return True - iReturn = configuration_specification.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn - - return iToken + return configuration_specification.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/block_statement.py b/vsg/vhdlFile/classify/block_statement.py index a29782fc4..f5a2a94ce 100644 --- a/vsg/vhdlFile/classify/block_statement.py +++ b/vsg/vhdlFile/classify/block_statement.py @@ -9,7 +9,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ block_statement ::= block_label : @@ -21,9 +21,10 @@ def detect(iToken, lObjects): end block [ block_label ] ; """ - if utils.are_next_consecutive_tokens([None, ":", "block"], iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.are_next_consecutive_tokens([None, ":", "block"]): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/case_generate_statement.py b/vsg/vhdlFile/classify/case_generate_statement.py index fa3714a92..eaa10f4ed 100644 --- a/vsg/vhdlFile/classify/case_generate_statement.py +++ b/vsg/vhdlFile/classify/case_generate_statement.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import case_generate_alternative, expression -def detect(iToken, lObjects): +def detect(oDataStructure): """ case_generate_statement ::= *generate*_label : @@ -15,13 +15,14 @@ def detect(iToken, lObjects): end generate [ *generate*_label ] ; """ - if utils.are_next_consecutive_tokens([None, ":", "case"], iToken, lObjects): - return classify(iToken, lObjects) - if utils.are_next_consecutive_tokens(["case"], iToken, lObjects): + if oDataStructure.are_next_consecutive_tokens([None, ":", "case"]): + classify(oDataStructure) + return True + if oDataStructure.is_next_token("case"): iIndex = utils.find_next_token(iToken, lObjects) oToken = token.case_keyword(lObjects[iToken].get_value()) utils.print_error_message("generate_label", oToken, iIndex, lObjects) - return iToken + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/component_instantiation_statement.py b/vsg/vhdlFile/classify/component_instantiation_statement.py index c85d2dab0..2ec9497f9 100644 --- a/vsg/vhdlFile/classify/component_instantiation_statement.py +++ b/vsg/vhdlFile/classify/component_instantiation_statement.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import generic_map_aspect, instantiated_unit, port_map_aspect -def detect(iToken, lObjects): +def detect(oDataStructure): """ component_instantiation_statement ::= instantiation_label : @@ -13,15 +13,12 @@ def detect(iToken, lObjects): [ generic_map_aspect ] [ port_map_aspect ] ; """ - iCurrent = utils.find_next_token(iToken, lObjects) - iCurrent = utils.increment_token_count(iCurrent) - iCurrent = utils.find_next_token(iCurrent, lObjects) - if not utils.object_value_is(lObjects, iCurrent, ":"): - return iToken - iCurrent = utils.increment_token_count(iCurrent) - if instantiated_unit.detect(iCurrent, lObjects): - return classify(iToken, lObjects) - return iToken + oDataStructure.align_seek_index() + oDataStructure.increment_seek_index() + oDataStructure.advance_to_next_seek_token() + if not oDataStructure.seek_token_lower_value_is(":"): + return False + return instantiated_unit.detect(oDataStructure) def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/concurrent_assertion_statement.py b/vsg/vhdlFile/classify/concurrent_assertion_statement.py index 314847148..829305176 100644 --- a/vsg/vhdlFile/classify/concurrent_assertion_statement.py +++ b/vsg/vhdlFile/classify/concurrent_assertion_statement.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import assertion -def detect(iToken, lObjects): +def detect(oDataStructure): """ concurrent_assertion_statement ::= [ label : ] [ postponed ] assertion ; @@ -17,9 +17,10 @@ def detect(iToken, lObjects): """ - if utils.find_in_next_n_tokens("assert", 4, iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.exists_in_next_n_tokens("assert", 4): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py index 55898e41c..6624dcddc 100644 --- a/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import conditional_waveforms, delay_mechanism -def detect(iToken, lObjects): +def detect(oDataStructure): """ [ label : ] [ postponed ] concurrent_conditional_signal_assignment @@ -21,23 +21,24 @@ def detect(iToken, lObjects): The key to detecting this is looking for an assignment <= followed by the keyword **when** before a semicolon. """ - iCurrent = iToken bAssignmentFound = False - - while lObjects[iCurrent].get_value() != ";": - if utils.is_item(lObjects, iCurrent): - if bAssignmentFound: - if utils.object_value_is(lObjects, iCurrent, "when"): - return True - else: - if utils.object_value_is(lObjects, iCurrent, "when"): - return False - if utils.object_value_is(lObjects, iCurrent, "with"): - return False - - if utils.object_value_is(lObjects, iCurrent, "<=") and not bAssignmentFound: + oDataStructure.align_seek_index() + while not oDataStructure.seek_token_lower_value_is(";"): + + if bAssignmentFound: + if utils.object_value_is(lObjects, iCurrent, "when"): + return True + else: + if oDataStructure.seek_token_lower_value_is("when"): + return False + if oDataStructure.seek_token_lower_value_is("with"): + return False + + if oDataStructure.seek_token_lower_value_is("<="): bAssignmentFound = True - iCurrent += 1 + + oDataStructure.increment_seek_index() + oDataStructure.advance_to_next_seek_token() return False diff --git a/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py b/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py index 8309d1192..674a15836 100644 --- a/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py +++ b/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py @@ -5,16 +5,16 @@ from vsg.vhdlFile.classify import procedure_call -def detect(iToken, lObjects): +def detect(oDataStructure): """ concurrent_procedure_call_statement ::= [ label : ] [ postponed ] procedure_call ; """ - iCurrent = iToken - if procedure_call.detect(iToken, lObjects): + if procedure_call.detect(oDataStructure): iCurrent = utils.tokenize_label(iToken, lObjects, token.label_name, token.label_colon) iCurrent = utils.tokenize_postponed(iCurrent, lObjects, token.postponed_keyword) iCurrent = procedure_call.classify(iCurrent, lObjects) iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + return True - return iCurrent + return False diff --git a/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py index 50266d0f4..1d525e662 100644 --- a/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import delay_mechanism, expression, selected_waveforms -def detect(iToken, lObjects): +def detect(oDataStructure): """ concurrent_selected_signal_assignment ::= with expression select [ ? ] @@ -13,8 +13,8 @@ def detect(iToken, lObjects): The key to detecting this is looking for the **with** keyword before the **select** keyword. """ - if utils.find_in_next_n_tokens("with", 4, iToken, lObjects): - if not utils.find_in_next_n_tokens("end", 1, iToken, lObjects): + if oDataStructure.exists_in_next_n_tokens("with", 4): + if not oDataStructure.exists_in_next_n_tokens("end", 1): return True return False diff --git a/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py b/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py index 0e9dae00d..d33716863 100644 --- a/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py +++ b/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py @@ -9,7 +9,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ concurrent_signal_assignment_statement ::= [ label : ] [ postponed ] concurrent_simple_signal_assignment @@ -17,20 +17,22 @@ def detect(iToken, lObjects): | [ label : ] [ postponed ] concurrent_selected_signal_assignment """ - iCurrent = iToken - if concurrent_selected_signal_assignment.detect(iToken, lObjects): - iCurrent = utils.tokenize_label(iCurrent, lObjects, token.label_name, token.label_colon) - iCurrent = utils.tokenize_postponed(iCurrent, lObjects, token.postponed_keyword) - iCurrent = concurrent_selected_signal_assignment.classify(iCurrent, lObjects) + if concurrent_selected_signal_assignment.detect(oDataStructure): + iCurrent = utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) + iCurrent = utils.tokenize_postponed(oDataStructure, token.postponed_keyword) + iCurrent = concurrent_selected_signal_assignment.classify(oDataStructure) + return True - elif concurrent_conditional_signal_assignment.detect(iToken, lObjects): - iCurrent = utils.tokenize_label(iCurrent, lObjects, token.label_name, token.label_colon) - iCurrent = utils.tokenize_postponed(iCurrent, lObjects, token.postponed_keyword) - iCurrent = concurrent_conditional_signal_assignment.classify(iCurrent, lObjects) + elif concurrent_conditional_signal_assignment.detect(oDataStructure): + iCurrent = utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) + iCurrent = utils.tokenize_postponed(oDataStructure, token.postponed_keyword) + iCurrent = concurrent_conditional_signal_assignment.classify(oDataStructure) + return True - elif concurrent_simple_signal_assignment.detect(iToken, lObjects): - iCurrent = utils.tokenize_label(iCurrent, lObjects, token.label_name, token.label_colon) - iCurrent = utils.tokenize_postponed(iCurrent, lObjects, token.postponed_keyword) - iCurrent = concurrent_simple_signal_assignment.classify(iCurrent, lObjects) + elif concurrent_simple_signal_assignment.detect(oDataStructure): + iCurrent = utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) + iCurrent = utils.tokenize_postponed(oDataStructure, token.postponed_keyword) + iCurrent = concurrent_simple_signal_assignment.classify(oDataStructure) + return True - return iCurrent + return False diff --git a/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py index 97fa81420..104f329b2 100644 --- a/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import delay_mechanism, waveform -def detect(iToken, lObjects): +def detect(oDataStructure): """ [ label : ] [ postponed ] concurrent_simple_signal_assignment @@ -16,11 +16,11 @@ def detect(iToken, lObjects): This will be the default if the other types are not found. """ - if not utils.assignment_operator_found(iToken, lObjects): - return False - if utils.find_in_range("when", iToken, ";", lObjects): - return False - return True + if oDataStructure.does_string_exist_before_string_honoring_parenthesis_hierarchy("<=", ";"): + if oDataStructure.does_string_exist_before_string("when", ";"): + return False + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/concurrent_statement.py b/vsg/vhdlFile/classify/concurrent_statement.py index ac2d6f707..6962a4e23 100644 --- a/vsg/vhdlFile/classify/concurrent_statement.py +++ b/vsg/vhdlFile/classify/concurrent_statement.py @@ -11,7 +11,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ concurrent_statement ::= block_statement @@ -24,32 +24,22 @@ def detect(iToken, lObjects): | PSL_PSL_Directive """ - iCurrent = process_statement.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if process_statement.detect(oDataStructure): + return True - iCurrent = block_statement.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if block_statement.detect(oDataStructure): + return True - iCurrent = generate_statement.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if generate_statement.detect(oDataStructure): + return True - iCurrent = concurrent_assertion_statement.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if concurrent_assertion_statement.detect(oDataStructure): + return True - iCurrent = concurrent_signal_assignment_statement.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if concurrent_signal_assignment_statement.detect(oDataStructure): + return True - iCurrent = concurrent_procedure_call_statement.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if concurrent_procedure_call_statement.detect(oDataStructure): + return True - iCurrent = component_instantiation_statement.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent - - return iToken + return component_instantiation_statement.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/configuration_specification.py b/vsg/vhdlFile/classify/configuration_specification.py index 79ba1b619..bf85f5410 100644 --- a/vsg/vhdlFile/classify/configuration_specification.py +++ b/vsg/vhdlFile/classify/configuration_specification.py @@ -3,14 +3,10 @@ from vsg.vhdlFile.classify import simple_configuration_specification -def detect(iToken, lObjects): +def detect(oDataStructure): """ configuration_specification ::= simple_configuration_specification | compound_configuration_specification """ - iReturn = simple_configuration_specification.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn - - return iToken + return simple_configuration_specification.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/for_generate_statement.py b/vsg/vhdlFile/classify/for_generate_statement.py index 5b22a3487..53e7c0c77 100644 --- a/vsg/vhdlFile/classify/for_generate_statement.py +++ b/vsg/vhdlFile/classify/for_generate_statement.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import generate_statement_body, parameter_specification -def detect(iToken, lObjects): +def detect(oDataStructure): """ for_generate_statement ::= *generate*_label : @@ -14,13 +14,14 @@ def detect(iToken, lObjects): end generate [ *generate*_label ] ; """ - if utils.are_next_consecutive_tokens([None, ":", "for"], iToken, lObjects): - return classify(iToken, lObjects) - if utils.are_next_consecutive_tokens(["for"], iToken, lObjects): + if oDataStructure.are_next_consecutive_tokens([None, ":", "for"]): + classify(oDataStructure) + return True + if oDataStructure.is_next_token("for"): iIndex = utils.find_next_token(iToken, lObjects) oToken = token.for_keyword(lObjects[iToken].get_value()) utils.print_error_message("generate_label", oToken, iIndex, lObjects) - return iToken + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/generate_statement.py b/vsg/vhdlFile/classify/generate_statement.py index 7a7f413ff..e1664aebc 100644 --- a/vsg/vhdlFile/classify/generate_statement.py +++ b/vsg/vhdlFile/classify/generate_statement.py @@ -7,7 +7,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ generate_statement ::= for_generate_statement @@ -15,16 +15,10 @@ def detect(iToken, lObjects): | case_generate_statement """ - iCurrent = for_generate_statement.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if for_generate_statement.detect(oDataStructure): + return True - iCurrent = if_generate_statement.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if if_generate_statement.detect(oDataStructure): + return True - iCurrent = case_generate_statement.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent - - return iCurrent + return case_generate_statement.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/if_generate_statement.py b/vsg/vhdlFile/classify/if_generate_statement.py index b7076f2be..c0fe70a9a 100644 --- a/vsg/vhdlFile/classify/if_generate_statement.py +++ b/vsg/vhdlFile/classify/if_generate_statement.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import condition, generate_statement_body -def detect(iToken, lObjects): +def detect(oDataStructure): """ if_generate_statement ::= *generate*_label : @@ -18,13 +18,14 @@ def detect(iToken, lObjects): end generate [ *generate*_label ] ; """ - if utils.are_next_consecutive_tokens([None, ":", "if"], iToken, lObjects): - return classify(iToken, lObjects) - if utils.are_next_consecutive_tokens(["if"], iToken, lObjects): + if oDataStructure.are_next_consecutive_tokens([None, ":", "if"]): + classify(oDataStructure) + return True + if oDataStructure.is_next_token("if"): iIndex = utils.find_next_token(iToken, lObjects) oToken = token.if_keyword(lObjects[iToken].get_value()) utils.print_error_message("generate_label", oToken, iIndex, lObjects) - return iToken + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/library_unit.py b/vsg/vhdlFile/classify/library_unit.py index 04755c4f4..fcdf76785 100644 --- a/vsg/vhdlFile/classify/library_unit.py +++ b/vsg/vhdlFile/classify/library_unit.py @@ -13,9 +13,4 @@ def detect(oDataStructure): if primary_unit.detect(oDataStructure): return True - -# iCurrent = secondary_unit.detect(iToken, lObjects) -# if iCurrent != iToken: -# return iCurrent -# -# return iToken + return secondary_unit.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/procedure_call.py b/vsg/vhdlFile/classify/procedure_call.py index dfc99a63a..d9547aeed 100644 --- a/vsg/vhdlFile/classify/procedure_call.py +++ b/vsg/vhdlFile/classify/procedure_call.py @@ -7,7 +7,7 @@ lExceptions = ["<=", "end", "map", "component", "entity", "configuration", "if"] -def detect(iToken, lObjects): +def detect(oDataStructure): """ Calling functions: @@ -25,14 +25,12 @@ def detect(iToken, lObjects): Differentiating a procedure call from anything else is essentially the absence of keywords. """ - iCurrent = iToken - - while lObjects[iCurrent].get_value() != ";": - if utils.is_item(lObjects, iCurrent): - if lObjects[iCurrent].get_lower_value() in lExceptions: - return False - iCurrent += 1 - + oDataStructure.align_seek_index() + while not oDataStructure.seek_token_lower_value_is(";"): + if oDataStructure.get_seek_token_lower_value() in lExceptions: + return False + oDataStructure.increment_seek_index() + oDataStructure.advance_to_next_seek_token() return True diff --git a/vsg/vhdlFile/classify/process_statement.py b/vsg/vhdlFile/classify/process_statement.py index 9ed3ad34d..4a91dd212 100644 --- a/vsg/vhdlFile/classify/process_statement.py +++ b/vsg/vhdlFile/classify/process_statement.py @@ -9,7 +9,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ process_statement ::= [ *process*_label : ] @@ -19,10 +19,11 @@ def detect(iToken, lObjects): process_statement_part end [ postponed ] process [ *process*_label ] ; """ - if utils.find_in_next_n_tokens("process", 4, iToken, lObjects): - if not utils.find_in_next_n_tokens(";", 3, iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.exists_in_next_n_tokens("process", 4): + if not oDataStructure.exists_in_next_n_tokens(";", 3): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/secondary_unit.py b/vsg/vhdlFile/classify/secondary_unit.py index 557fe9b35..17551b261 100644 --- a/vsg/vhdlFile/classify/secondary_unit.py +++ b/vsg/vhdlFile/classify/secondary_unit.py @@ -3,18 +3,13 @@ from vsg.vhdlFile.classify import architecture_body, package_body -def detect(iToken, lObjects): +def detect(oDataStructure): """ secondary_unit ::= architecture_body | package_body """ - iReturned = architecture_body.detect(iToken, lObjects) - if iReturned != iToken: - return iReturned + if architecture_body.detect(oDataStructure): + return True - iReturned = package_body.detect(iToken, lObjects) - if iReturned != iToken: - return iReturned - - return iToken + return package_body.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/simple_configuration_specification.py b/vsg/vhdlFile/classify/simple_configuration_specification.py index bead53ea5..4ef87a431 100644 --- a/vsg/vhdlFile/classify/simple_configuration_specification.py +++ b/vsg/vhdlFile/classify/simple_configuration_specification.py @@ -5,29 +5,27 @@ from vsg.vhdlFile.classify import binding_indication, component_specification -def detect(iToken, lObjects): +def detect(oDataStructure): """ simple_configuration_specification ::= **for** component_specification binding_indication ; [ **end** **for** ; ] """ - if utils.is_next_token("for", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token("for"): + classify(oDataStructure) + return True + return False -def classify(iToken, lObjects): - iCurrent = iToken +def classify(oDataStructure): - iCurrent = utils.assign_next_token_required("for", token.for_keyword, iCurrent, lObjects) + oDataStructure.assign_next_token_with(token.for_keyword) - iCurrent = component_specification.classify(iCurrent, lObjects) - iCurrent = binding_indication.classify(iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + component_specification.classify(oDataStructure) + binding_indication.classify(oDataStructure) + oDataStructure.assign_next_token_required(";", token.semicolon) - if utils.is_next_token("end", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("for", token.end_for_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + if utils.is_next_token("end"): + oDataStructure.assign_next_token_required("end", token.end_keyword) + oDataStructure.assign_next_token_required("for", token.end_for_keyword) + oDataStructure.assign_next_token_required(";", token.semicolon) From 667570989f1932526393a930bcf37779d6a18cba Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 6 Feb 2025 21:23:52 -0600 Subject: [PATCH 017/124] Refactoring data_structure. --- vsg/data_structure.py | 5 +---- vsg/vhdlFile/classify/concurrent_assertion_statement.py | 2 +- .../classify/concurrent_selected_signal_assignment.py | 4 ++-- vsg/vhdlFile/classify/function_specification.py | 2 +- vsg/vhdlFile/classify/package_declaration.py | 4 ++-- vsg/vhdlFile/classify/procedure_specification.py | 2 +- vsg/vhdlFile/classify/process_statement.py | 4 ++-- 7 files changed, 10 insertions(+), 13 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 46c398ecd..21f296276 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -44,9 +44,6 @@ def are_next_consecutive_tokens(self, lTokens): def current_token_lower_value_is(self, sString): return self.get_current_token_lower_value() == sString - def seek_token_lower_value_is(self, sString): - return self.get_seek_token_lower_value() == sString - def does_string_exist_before_string(self, sFirst, sSecond): for oToken in self.lAllObjects[self.iCurrent : :]: if oToken.lower_value == sSecond: @@ -77,7 +74,7 @@ def does_string_exist_before_seek_index_honoring_parenthesis_hierarchy(self, sSt return True return False - def exists_in_next_n_tokens(self, sString, iNumTokens): + def does_string_exist_in_next_n_tokens(self, sString, iNumTokens): self.iSeek = self.iCurrent for x in range(0, iNumTokens): self.seek_to_next_token() diff --git a/vsg/vhdlFile/classify/concurrent_assertion_statement.py b/vsg/vhdlFile/classify/concurrent_assertion_statement.py index 829305176..9072c5611 100644 --- a/vsg/vhdlFile/classify/concurrent_assertion_statement.py +++ b/vsg/vhdlFile/classify/concurrent_assertion_statement.py @@ -17,7 +17,7 @@ def detect(oDataStructure): """ - if oDataStructure.exists_in_next_n_tokens("assert", 4): + if oDataStructure.does_string_exist_in_next_n_tokens("assert", 4): classify(oDataStructure) return True return False diff --git a/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py index 1d525e662..6c17bdbf7 100644 --- a/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py @@ -13,8 +13,8 @@ def detect(oDataStructure): The key to detecting this is looking for the **with** keyword before the **select** keyword. """ - if oDataStructure.exists_in_next_n_tokens("with", 4): - if not oDataStructure.exists_in_next_n_tokens("end", 1): + if oDataStructure.does_string_exist_in_next_n_tokens("with", 4): + if not oDataStructure.does_string_exist_in_next_n_tokens("end", 1): return True return False diff --git a/vsg/vhdlFile/classify/function_specification.py b/vsg/vhdlFile/classify/function_specification.py index 389634b53..5bf4257e7 100644 --- a/vsg/vhdlFile/classify/function_specification.py +++ b/vsg/vhdlFile/classify/function_specification.py @@ -14,7 +14,7 @@ def detect(oDataStructure): """ if oDataStructure.is_next_token_one_of(["pure", "impure", "function"]): - if not oDataStructure.exists_in_next_n_tokens("new", 4): + if not oDataStructure.does_string_exist_in_next_n_tokens("new", 4): classify(oDataStructure) return True return False diff --git a/vsg/vhdlFile/classify/package_declaration.py b/vsg/vhdlFile/classify/package_declaration.py index 74c92a628..b47cad8d1 100644 --- a/vsg/vhdlFile/classify/package_declaration.py +++ b/vsg/vhdlFile/classify/package_declaration.py @@ -14,8 +14,8 @@ def detect(oDataStructure): """ if oDataStructure.is_next_token("package"): - if not oDataStructure.exists_in_next_n_tokens("body", 5): - if not oDataStructure.exists_in_next_n_tokens("new", 5): + if not oDataStructure.does_string_exist_in_next_n_tokens("body", 5): + if not oDataStructure.does_string_exist_in_next_n_tokens("new", 5): classify(oDataStructure) return True return False diff --git a/vsg/vhdlFile/classify/procedure_specification.py b/vsg/vhdlFile/classify/procedure_specification.py index 4f2f976c2..1a658f4a4 100644 --- a/vsg/vhdlFile/classify/procedure_specification.py +++ b/vsg/vhdlFile/classify/procedure_specification.py @@ -14,7 +14,7 @@ def detect(oDataStructure): """ if oDataStructure.is_next_token("procedure"): - if not oDataStructure.exists_in_next_n_tokens("new", 4): + if not oDataStructure.does_string_exist_in_next_n_tokens("new", 4): classify(oDataStructure) return True return False diff --git a/vsg/vhdlFile/classify/process_statement.py b/vsg/vhdlFile/classify/process_statement.py index 4a91dd212..2386f6a25 100644 --- a/vsg/vhdlFile/classify/process_statement.py +++ b/vsg/vhdlFile/classify/process_statement.py @@ -19,8 +19,8 @@ def detect(oDataStructure): process_statement_part end [ postponed ] process [ *process*_label ] ; """ - if oDataStructure.exists_in_next_n_tokens("process", 4): - if not oDataStructure.exists_in_next_n_tokens(";", 3): + if oDataStructure.does_string_exist_in_next_n_tokens("process", 4): + if not oDataStructure.does_string_exist_in_next_n_tokens(";", 3): classify(oDataStructure) return True return False From d93121852ada6f1e0e040e4e577da28bd421b078 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 6 Feb 2025 21:42:14 -0600 Subject: [PATCH 018/124] Refactoring architecture_body. --- vsg/vhdlFile/classify/architecture_body.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/vsg/vhdlFile/classify/architecture_body.py b/vsg/vhdlFile/classify/architecture_body.py index 7687ccb5b..c3dbadc4c 100644 --- a/vsg/vhdlFile/classify/architecture_body.py +++ b/vsg/vhdlFile/classify/architecture_body.py @@ -23,27 +23,18 @@ def detect(oDataStructure): def classify(oDataStructure): - classify_opening_declaration(oDataStructure) - - architecture_declarative_part.detect(oDataStructure) - - oDataStructure.replace_next_token_required("begin", token.begin_keyword) - - #architecture_statement_part.classify_until(["end"]) - architecture_statement_part.detect(oDataStructure) - - classify_closing_declaration(oDataStructure) - - -def classify_opening_declaration(oDataStructure): oDataStructure.replace_next_token_with(token.architecture_keyword) oDataStructure.replace_next_token_with(token.identifier) oDataStructure.replace_next_token_required("of", token.of_keyword) oDataStructure.replace_next_token_with(token.entity_name) oDataStructure.replace_next_token_required("is", token.is_keyword) + architecture_declarative_part.detect(oDataStructure) + + oDataStructure.replace_next_token_required("begin", token.begin_keyword) + + architecture_statement_part.detect(oDataStructure) -def classify_closing_declaration(oDataStructure): oDataStructure.replace_next_token_required("end", token.end_keyword) oDataStructure.replace_next_token_with_if("architecture", token.end_architecture_keyword) oDataStructure.replace_next_token_with_if_not(";", token.architecture_simple_name) From 8a515d0110c4270ff86be62a67eef2e33bff60bb Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 6 Feb 2025 21:44:21 -0600 Subject: [PATCH 019/124] Running style checks. --- .../classify/concurrent_conditional_signal_assignment.py | 1 - vsg/vhdlFile/classify/simple_configuration_specification.py | 1 - 2 files changed, 2 deletions(-) diff --git a/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py index 6624dcddc..171a4d68b 100644 --- a/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py @@ -24,7 +24,6 @@ def detect(oDataStructure): bAssignmentFound = False oDataStructure.align_seek_index() while not oDataStructure.seek_token_lower_value_is(";"): - if bAssignmentFound: if utils.object_value_is(lObjects, iCurrent, "when"): return True diff --git a/vsg/vhdlFile/classify/simple_configuration_specification.py b/vsg/vhdlFile/classify/simple_configuration_specification.py index 4ef87a431..8ef6b190d 100644 --- a/vsg/vhdlFile/classify/simple_configuration_specification.py +++ b/vsg/vhdlFile/classify/simple_configuration_specification.py @@ -18,7 +18,6 @@ def detect(oDataStructure): def classify(oDataStructure): - oDataStructure.assign_next_token_with(token.for_keyword) component_specification.classify(oDataStructure) From dcbcb486324c7a8cc23bb17949e47f6f8bc441ea Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 6 Feb 2025 21:52:57 -0600 Subject: [PATCH 020/124] Parsing package_body. --- vsg/vhdlFile/classify/package_body.py | 42 ++++------ .../classify/package_body_declarative_item.py | 79 +++++++------------ .../classify/package_body_declarative_part.py | 10 +-- 3 files changed, 47 insertions(+), 84 deletions(-) diff --git a/vsg/vhdlFile/classify/package_body.py b/vsg/vhdlFile/classify/package_body.py index 614c3d67c..1a3354296 100644 --- a/vsg/vhdlFile/classify/package_body.py +++ b/vsg/vhdlFile/classify/package_body.py @@ -19,31 +19,17 @@ def detect(oDataStructure): return False -def classify(iToken, lObjects): - iCurrent = classify_opening_declaration(iToken, lObjects) - - iCurrent = package_body_declarative_part.detect(iCurrent, lObjects) - - iCurrent = classify_closing_declaration(iToken, lObjects) - - return iCurrent - - -def classify_opening_declaration(iToken, lObjects): - iCurrent = utils.assign_next_token_required("package", token.package_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("body", token.body_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.package_simple_name, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iCurrent, lObjects) - - return iCurrent - - -def classify_closing_declaration(iToken, lObjects): - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iToken, lObjects) - if utils.are_next_consecutive_tokens(["package"], iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("package", token.end_package_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("body", token.end_body_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.end_package_simple_name, iToken, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iToken, lObjects) - - return iCurrent +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.package_keyword) + oDataStructure.replace_next_token_required("body", token.body_keyword) + oDataStructure.replace_next_token_with(token.package_simple_name) + oDataStructure.replace_next_token_required("is", token.is_keyword) + + package_body_declarative_part.detect(oDataStructure) + + oDataStructure.replace_next_token_required("end", token.end_keyword) + if oDataStructure.is_next_token("package"): + oDataStructure.replace_next_token_with(token.end_package_keyword) + oDataStructure.replace_next_token_required("body", token.end_body_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.end_package_simple_name) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/package_body_declarative_item.py b/vsg/vhdlFile/classify/package_body_declarative_item.py index bea7eee02..9184c3bb2 100644 --- a/vsg/vhdlFile/classify/package_body_declarative_item.py +++ b/vsg/vhdlFile/classify/package_body_declarative_item.py @@ -20,7 +20,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ package_body_declarative_item ::= subprogram_declaration @@ -42,65 +42,46 @@ def detect(iToken, lObjects): | group_declaration """ - iReturn = subprogram_declaration.detect(iToken, lObjects) - if iReturn != iToken: - iReturn = subprogram_body.detect(iReturn, lObjects) - return iReturn + if subprogram_declaration.detect(oDataStructure): + return subprogram_body.detect(iReturn, lObjects) - iReturn = subprogram_instantiation_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if subprogram_instantiation_declaration.detect(oDataStructure): + return True - iReturn = package_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_declaration.detect(oDataStructure): + return True - iReturn = package_body.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_body.detect(oDataStructure): + return True - iReturn = package_instantiation_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_instantiation_declaration.detect(oDataStructure): + return True - iReturn = type_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if type_declaration.detect(oDataStructure): + return True - iReturn = subtype_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if subtype_declaration.detect(oDataStructure): + return True - iReturn = constant_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if constant_declaration.detect(oDataStructure): + return True - iReturn = variable_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if variable_declaration.detect(oDataStructure): + return True - iReturn = file_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if file_declaration.detect(oDataStructure): + return True - iReturn = alias_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if alias_declaration.detect(oDataStructure): + return True - iReturn = component_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if component_declaration.detect(oDataStructure): + return True - iReturn = attribute_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if attribute_declaration.detect(oDataStructure): + return True - iReturn = attribute_specification.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if attribute_specification.detect(oDataStructure): + return True - iReturn = use_clause.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn - - return iToken + return use_clause.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/package_body_declarative_part.py b/vsg/vhdlFile/classify/package_body_declarative_part.py index aed9e779c..a515562f9 100644 --- a/vsg/vhdlFile/classify/package_body_declarative_part.py +++ b/vsg/vhdlFile/classify/package_body_declarative_part.py @@ -3,15 +3,11 @@ from vsg.vhdlFile.classify import package_body_declarative_item -def detect(iToken, lObjects): +def detect(oDataStructure): """ package_body_declarative_part ::= { package_body_declarative_item } """ - iLast = 0 - iCurrent = iToken - while iLast != iCurrent: - iLast = iCurrent - iCurrent = package_body_declarative_item.detect(iCurrent, lObjects) - return iCurrent + while package_body_declarative_item.detect(oDataStructure): + pass From 426b26019c350eaf1d75d741add9fd071f240b23 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 6 Feb 2025 21:57:03 -0600 Subject: [PATCH 021/124] Refactoring. --- vsg/vhdlFile/classify/package_body.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vsg/vhdlFile/classify/package_body.py b/vsg/vhdlFile/classify/package_body.py index 1a3354296..6c5a300ce 100644 --- a/vsg/vhdlFile/classify/package_body.py +++ b/vsg/vhdlFile/classify/package_body.py @@ -28,8 +28,10 @@ def classify(oDataStructure): package_body_declarative_part.detect(oDataStructure) oDataStructure.replace_next_token_required("end", token.end_keyword) + if oDataStructure.is_next_token("package"): oDataStructure.replace_next_token_with(token.end_package_keyword) oDataStructure.replace_next_token_required("body", token.end_body_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.end_package_simple_name) oDataStructure.replace_next_token_required(";", token.semicolon) From 8f4838f6bfef1406480009e5d271d88d57e3b960 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 8 Feb 2025 13:19:41 -0600 Subject: [PATCH 022/124] Parsing signal_declaration. --- .../classification_results.txt | 5 +- .../classification_test_input.vhd | 2 +- vsg/data_structure.py | 41 +++++++++- vsg/vhdlFile/classify/array_constraint.py | 52 +++++------- .../classify/array_element_constraint.py | 4 +- vsg/vhdlFile/classify/attribute_name.py | 37 ++++----- vsg/vhdlFile/classify/bit_string_literal.py | 44 +++++----- vsg/vhdlFile/classify/character_literal.py | 21 +++++ vsg/vhdlFile/classify/constraint.py | 23 ++---- vsg/vhdlFile/classify/discrete_range.py | 35 +++----- vsg/vhdlFile/classify/element_constraint.py | 13 +-- vsg/vhdlFile/classify/expression.py | 79 +++++++++--------- .../classify/external_constant_name.py | 10 +-- vsg/vhdlFile/classify/external_name.py | 18 ++--- vsg/vhdlFile/classify/external_signal_name.py | 10 +-- .../classify/external_variable_name.py | 10 +-- vsg/vhdlFile/classify/identifier_list.py | 14 +--- vsg/vhdlFile/classify/index_constraint.py | 22 ++--- vsg/vhdlFile/classify/prefix.py | 13 +++ vsg/vhdlFile/classify/range.py | 62 ++------------ vsg/vhdlFile/classify/range_constraint.py | 9 ++- vsg/vhdlFile/classify/record_constraint.py | 14 ++-- .../classify/record_element_constraint.py | 8 +- .../classify/resolution_indication.py | 34 ++++---- vsg/vhdlFile/classify/signal_declaration.py | 23 +++--- vsg/vhdlFile/classify/signal_kind.py | 22 +++-- vsg/vhdlFile/classify/signature.py | 10 +-- vsg/vhdlFile/classify/subtype_indication.py | 11 +-- vsg/vhdlFile/classify/type_mark.py | 10 +-- vsg/vhdlFile/classify/utils.py | 81 +++++++++++++++++++ vsg/vhdlFile/utils.py | 77 ------------------ 31 files changed, 394 insertions(+), 420 deletions(-) create mode 100644 vsg/vhdlFile/classify/character_literal.py create mode 100644 vsg/vhdlFile/classify/prefix.py diff --git a/tests/vhdlFile/signal_declaration/classification_results.txt b/tests/vhdlFile/signal_declaration/classification_results.txt index f27df0488..fad2d5aea 100644 --- a/tests/vhdlFile/signal_declaration/classification_results.txt +++ b/tests/vhdlFile/signal_declaration/classification_results.txt @@ -39,7 +39,7 @@ 7 | -------------------------------------------------------------------------------- -8 | signal fifo_wr : std_logic_vector(3 downto 0) := "000"; +8 | signal fifo_wr : std_logic_vector(3 downto 0) := b"000"; @@ -50,7 +50,8 @@ - + + -------------------------------------------------------------------------------- 9 | diff --git a/tests/vhdlFile/signal_declaration/classification_test_input.vhd b/tests/vhdlFile/signal_declaration/classification_test_input.vhd index ddcb23f38..94a05413f 100644 --- a/tests/vhdlFile/signal_declaration/classification_test_input.vhd +++ b/tests/vhdlFile/signal_declaration/classification_test_input.vhd @@ -5,7 +5,7 @@ architecture RTL of FIFO is signal fifo_wr : std_logic_vector(3 downto 0); - signal fifo_wr : std_logic_vector(3 downto 0) := "000"; + signal fifo_wr : std_logic_vector(3 downto 0) := b"000"; signal fifo_wr, fifo_rd, fifo_empty : std_logic := '1'; diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 21f296276..11b0cb3da 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -14,6 +14,10 @@ def __init__(self, lAllObjects): self.iCurrent = 0 self.iSeek = 0 + def advance_seek_index_to_current_index(self): + if self.iSeek < self.iCurrent: + self.iSeek = self.iCurrent + def advance_to_next_token(self): for iIndex, oToken in enumerate(self.lAllObjects[self.iCurrent : :]): if type(oToken) == parser.item: @@ -44,6 +48,11 @@ def are_next_consecutive_tokens(self, lTokens): def current_token_lower_value_is(self, sString): return self.get_current_token_lower_value() == sString + def does_seek_token_match_regex(self, oRegex): + if oRegex.fullmatch(self.get_seek_token_lower_value()) is not None: + return True + return False + def does_string_exist_before_string(self, sFirst, sSecond): for oToken in self.lAllObjects[self.iCurrent : :]: if oToken.lower_value == sSecond: @@ -51,6 +60,17 @@ def does_string_exist_before_string(self, sFirst, sSecond): if oToken.lower_value == sFirst: return True + def does_string_exist_before_matching_close_parenthesis(self, sString): + iParen = 0 + for oToken in self.lAllObjects[self.iSeek: :]: + if iParen == 0 and oToken.lower_value == sString: + return True + if oToken.lower_value == "(": + iParen += 1 + elif oToken.lower_value == ")": + iParen -= 1 + return False + def does_string_exist_before_string_honoring_parenthesis_hierarchy(self, sFirst, sSecond): iParen = 0 for oToken in self.lAllObjects[self.iCurrent : :]: @@ -109,7 +129,11 @@ def increment_seek_index(self): def is_next_seek_token(self, sString): self.advance_to_next_seek_token() - return self.current_token_lower_value_is(sString) + return self.seek_token_lower_value_is(sString) + + def is_next_seek_token_one_of(self, lString): + self.advance_to_next_seek_token() + return self.get_seek_token_lower_value() in lString def is_next_token(self, sString): self.advance_to_next_token() @@ -174,3 +198,18 @@ def seek_to_next_token(self): def seek_token_lower_value_is(self, sString): return self.get_seek_token_lower_value() == sString + + def advance_seek_over_parenthesis(self): + if not self.seek_token_lower_value_is("("): + return False + + iParen = 0 + for iToken, oToken in enumerate(self.lAllObjects[self.iSeek : :]): + if oToken.lower_value == "(": + iParen += 1 + elif oToken.lower_value == ")": + iParen -= 1 + if iParen == 0: + self.iSeek += iToken + return True + return False diff --git a/vsg/vhdlFile/classify/array_constraint.py b/vsg/vhdlFile/classify/array_constraint.py index 05e339efe..00c5f92e4 100644 --- a/vsg/vhdlFile/classify/array_constraint.py +++ b/vsg/vhdlFile/classify/array_constraint.py @@ -5,47 +5,37 @@ from vsg.vhdlFile.classify import array_element_constraint, index_constraint -def detect(iToken, lObjects): +def detect(oDataStructure): """ array_constraint ::= index_constraint [ array_element_constraint ] | ( open ) [ array_element_constraint ] """ - if open_detected(iToken, lObjects): - return classify(iToken, lObjects) - if index_constraint.detect(iToken, lObjects): - return classify(iToken, lObjects) - return iToken - - -def detect_discrete_subtype_indication(iToken, lObjects): - if utils.is_next_token("(", iToken, lObjects): - return index_constraint.classify(iToken, lObjects) - return iToken - + if open_detected(oDataStructure): + classify_open(oDataStructure) + return True + if index_constraint.detect(oDataStructure): + index_constraint.classify(oDataStructure) + array_element_constraint.detect(oDataStructure) + return True + return False -def classify(iToken, lObjects): - iCurrent = utils.find_next_token(iToken, lObjects) - if utils.is_next_token("open", iCurrent + 1, lObjects): - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("open", token.open_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) - else: - iCurrent = index_constraint.classify(iCurrent, lObjects) - iCurrent = array_element_constraint.detect(iCurrent, lObjects) +def detect_discrete_subtype_indication(oDataStructure): + oDataStructure.align_seek_index() + if oDataStructure.is_next_seek_token("("): + index_constraint.classify(oDataStructure) + return True + return False - return iCurrent +def open_detected(oDataStructure): + return oDataStructure.are_next_consecutive_tokens(["(", "open"]) -def open_detected(iToken, lObjects): - if utils.is_next_token("(", iToken, lObjects): - if utils.find_in_next_n_tokens("open", 2, iToken, lObjects): - return True - return False +def classify_open(oDataStructure): + oDataStructure.replace_next_token_with(token.open_parenthesis) + oDataStructure.replace_next_token_with(token.open_keyword) + oDataStructure.replace_next_token_required(")", token.close_parenthesis) -def classify_index_constraint(iToken, lObjects): - print("--> classify_index_constraint") - return index_constraint.classify(iToken, lObjects) diff --git a/vsg/vhdlFile/classify/array_element_constraint.py b/vsg/vhdlFile/classify/array_element_constraint.py index 384bc08f0..ec95e7deb 100644 --- a/vsg/vhdlFile/classify/array_element_constraint.py +++ b/vsg/vhdlFile/classify/array_element_constraint.py @@ -3,8 +3,8 @@ from vsg.vhdlFile.classify import element_constraint -def detect(iToken, lObjects): +def detect(oDataStructure): """ array_element_constraint ::= element_constraint """ - return element_constraint.detect(iToken, lObjects) + return element_constraint.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/attribute_name.py b/vsg/vhdlFile/classify/attribute_name.py index 792c74fa8..23283d907 100644 --- a/vsg/vhdlFile/classify/attribute_name.py +++ b/vsg/vhdlFile/classify/attribute_name.py @@ -3,47 +3,40 @@ from vsg import parser from vsg.token import attribute_name as token from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import expression, signature +from vsg.vhdlFile.classify import expression, prefix, signature -def detect(iToken, lObjects): +def detect(oDataStructure): """ attribute_name ::= prefix [ signature ] ' attribute_designator [ ( expression ) ] """ # Skip over prefix - iCurrent = utils.find_next_token(iToken, lObjects) - iCurrent = utils.find_next_token(iCurrent + 1, lObjects) - - if utils.token_is_open_parenthesis(iCurrent, lObjects): - iCurrent += 1 - iCurrent = utils.skip_tokens_until_matching_closing_paren(iCurrent, lObjects) - iCurrent += 1 + oDataStructure.advance_seek_index_to_current_index() + oDataStructure.advance_to_next_seek_token() + skip_prefix(oDataStructure) # Check for signature - if utils.is_next_token("[", iCurrent, lObjects): + if oDataStructure.is_next_seek_token("["): return True # Check for tic - if utils.is_next_token("'", iCurrent, lObjects): + if oDataStructure.is_next_seek_token("'"): return True return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token(token.name, iToken, lObjects) - iCurrent = utils.find_next_token(iCurrent, lObjects) +def skip_prefix(oDataStructure): + oDataStructure.increment_seek_index() + oDataStructure.advance_seek_over_parenthesis() - if utils.token_is_open_parenthesis(iCurrent, lObjects): - iCurrent = utils.assign_token(lObjects, iCurrent, parser.open_parenthesis) - iCurrent = utils.assign_tokens_until_matching_closing_paren(parser.todo, iCurrent, lObjects) - iCurrent = utils.assign_token(lObjects, iCurrent, parser.close_parenthesis) - signature.detect(iCurrent, lObjects) +def classify(oDataStructure): + prefix.classify(oDataStructure, token) - iCurrent = utils.assign_next_token_required("'", token.tic, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.attribute, iCurrent, lObjects) + signature.detect(oDataStructure) - return iCurrent + oDataStructure.replace_next_token_required("'", token.tic) + oDataStructure.replace_next_token_with(token.attribute) diff --git a/vsg/vhdlFile/classify/bit_string_literal.py b/vsg/vhdlFile/classify/bit_string_literal.py index 85eea5ee9..fd15d2da7 100644 --- a/vsg/vhdlFile/classify/bit_string_literal.py +++ b/vsg/vhdlFile/classify/bit_string_literal.py @@ -3,35 +3,35 @@ import re from vsg.token import bit_string_literal as token -from vsg.vhdlFile import utils oIntegerRegex = re.compile(r"\d+") oBaseSpecifierRegex = re.compile(r"(([us]?[box])|d)") oBitValueStringRegex = re.compile(r'"[0-9a-fhluwxz\-_]*"') -def detect(iToken, lObjects): +def detect(oDataStructure): """ bit_string_literal ::= [ integer ] base_specifier " [ bit_value ] " """ - - iCurrent = utils.find_next_token(iToken, lObjects) - if utils.matches_next_token(oIntegerRegex, iToken, lObjects): - iCurrent += 1 - if utils.matches_next_token(oBaseSpecifierRegex, iCurrent, lObjects): - iCurrent = utils.find_next_token(iCurrent, lObjects) - iCurrent += 1 - if utils.matches_next_token(oBitValueStringRegex, iCurrent, lObjects): - return classify(iToken, lObjects) - return iToken - - -def classify(iToken, lObjects): - if utils.matches_next_token(oIntegerRegex, iToken, lObjects): - iCurrent = utils.assign_next_token(token.integer, iToken, lObjects) - else: - iCurrent = iToken - iCurrent = utils.assign_next_token(token.base_specifier, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.bit_value_string, iCurrent, lObjects) - return iCurrent + oDataStructure.align_seek_index() + bInt = False + if oDataStructure.does_seek_token_match_regex(oIntegerRegex): + oDataStructure.increment_seek_index() + oDataStructure.advance_to_next_seek_token() + bInt = True + if oDataStructure.does_seek_token_match_regex(oBaseSpecifierRegex): + oDataStructure.increment_seek_index() + oDataStructure.advance_to_next_seek_token() + + if oDataStructure.does_seek_token_match_regex(oBitValueStringRegex): + classify(oDataStructure, bInt) + return True + return False + + +def classify(oDataStructure, bInt): + if bInt: + oDataStructure.replace_next_token_with(token.integer) + oDataStructure.replace_next_token_with(token.base_specifier) + oDataStructure.replace_next_token_with(token.bit_value_string) diff --git a/vsg/vhdlFile/classify/character_literal.py b/vsg/vhdlFile/classify/character_literal.py new file mode 100644 index 000000000..dd6a9b479 --- /dev/null +++ b/vsg/vhdlFile/classify/character_literal.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + +from vsg import parser + + +def detect(oDataStructure): + """ + character_literal ::= + ' graphic_character ' + """ + oDataStructure.align_seek_index() + oDataStructure.advance_to_next_seek_token() + sValue = oDataStructure.get_seek_token_lower_value() + if len(sValue) == 3 and sValue.startswith("'") and sValue.endswith("'"): + classify(oDataStructure) + return True + return False + + +def classify(oDataStructure): + oDataStructure.replace_next_token_with(parser.character_literal) diff --git a/vsg/vhdlFile/classify/constraint.py b/vsg/vhdlFile/classify/constraint.py index 78a472232..aba94a379 100644 --- a/vsg/vhdlFile/classify/constraint.py +++ b/vsg/vhdlFile/classify/constraint.py @@ -3,27 +3,20 @@ from vsg.vhdlFile.classify import array_constraint, range_constraint, record_constraint -def detect(iToken, lObjects): +def detect(oDataStructure): """ constraint ::= range_constraint | array_constraint | record_constraint """ - iReturn = range_constraint.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if range_constraint.detect(oDataStructure): + return True - iReturn = array_constraint.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if array_constraint.detect(oDataStructure): + return True - iReturn = record_constraint.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if record_constraint.detect(oDataStructure): + return True - iReturn = array_constraint.detect_discrete_subtype_indication(iToken, lObjects) - if iReturn != iToken: - return iReturn - - return iToken + return array_constraint.detect_discrete_subtype_indication(oDataStructure) diff --git a/vsg/vhdlFile/classify/discrete_range.py b/vsg/vhdlFile/classify/discrete_range.py index a87ba347c..41f2a8920 100644 --- a/vsg/vhdlFile/classify/discrete_range.py +++ b/vsg/vhdlFile/classify/discrete_range.py @@ -5,14 +5,15 @@ from vsg.vhdlFile.classify import range, subtype_indication -def detect(iToken, lObjects): +def detect(oDataStructure): """ discrete_range ::= *discrete*_subtype_indication | range """ - if utils.are_next_consecutive_tokens([None, "(", None, ")"], iToken, lObjects): - return subtype_indication.classify(iToken, lObjects) - return range.detect(iToken, lObjects) + if oDataStructure.are_next_consecutive_tokens([None, "(", None, ")"]): + subtype_indication.classify(oDataStructure) + return True + return range.detect(oDataStructure) def classify(iToken, lObjects): @@ -24,32 +25,20 @@ def classify(iToken, lObjects): return utils.assign_token(lObjects, iToken, parser.todo) -def classify_until(lUntils, iToken, lObjects): - iCurrent = iToken - iStop = len(lObjects) - 1 +def classify_until(lUntils, oDataStructure): iOpenParenthesis = 0 iCloseParenthesis = 0 - iPrevious = -1 - while iCurrent < iStop: - iCurrent = utils.find_next_token(iCurrent, lObjects) + while not oDataStructure.is_next_token_one_of(lUntils): - if iCurrent == iPrevious: - utils.print_missing_error_message(lUntils, iToken, lObjects) +# if iCurrent == iPrevious: +# utils.print_missing_error_message(lUntils, iToken, lObjects) - if utils.token_is_open_parenthesis(iCurrent, lObjects): + if oDataStructure.current_token_lower_value_is("("): iOpenParenthesis += 1 - if utils.token_is_close_parenthesis(iCurrent, lObjects): + elif oDataStructure.current_token_lower_value_is(")"): iCloseParenthesis += 1 if iOpenParenthesis < iCloseParenthesis: break - elif iOpenParenthesis == iCloseParenthesis: - if lObjects[iCurrent].get_lower_value() in lUntils: - break - else: - utils.assign_token(lObjects, iCurrent, parser.todo) else: - utils.assign_token(lObjects, iCurrent, parser.todo) - iPrevious = iCurrent - - return iCurrent + oDataStructure.replace_current_token_with(parser.todo) diff --git a/vsg/vhdlFile/classify/element_constraint.py b/vsg/vhdlFile/classify/element_constraint.py index 054997ee3..c550ebca3 100644 --- a/vsg/vhdlFile/classify/element_constraint.py +++ b/vsg/vhdlFile/classify/element_constraint.py @@ -3,19 +3,14 @@ from vsg.vhdlFile.classify import array_constraint, record_constraint -def detect(iToken, lObjects): +def detect(oDataStructure): """ element_constraint ::= array_constraint | record_constraint """ - iReturn = array_constraint.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if array_constraint.detect(oDataStructure): + return True - iReturn = record_constraint.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn - - return iToken + return record_constraint.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/expression.py b/vsg/vhdlFile/classify/expression.py index dd88667d9..2f057af24 100644 --- a/vsg/vhdlFile/classify/expression.py +++ b/vsg/vhdlFile/classify/expression.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- from vsg import parser -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import bit_string_literal, external_name +from vsg.vhdlFile.classify import bit_string_literal, character_literal, external_name, utils def classify(iToken, lObjects): @@ -14,53 +13,55 @@ def classify(iToken, lObjects): return utils.assign_token(lObjects, iToken, parser.todo) -def classify_until(lUntils, iToken, lObjects, oType=parser.todo): +def classify_until(lUntils, oDataStructure, oType=parser.todo): """ expression ::= condition_operator primary | logical_expression """ - iCurrent = iToken - iStop = len(lObjects) - 1 - iOpenParenthesis = 0 - iCloseParenthesis = 0 - iPrevious = 0 - while iCurrent < iStop: - if iCurrent == iPrevious: - break - iPrevious = iCurrent - iCurrent = utils.find_next_token(iCurrent, lObjects) - if utils.token_is_open_parenthesis(iCurrent, lObjects): - iOpenParenthesis += 1 - if utils.token_is_close_parenthesis(iCurrent, lObjects): - iCloseParenthesis += 1 + iParen = 0 + while oDataStructure.advance_to_next_token(): + iParen = update_paren_counter(iParen, oDataStructure) - if iOpenParenthesis < iCloseParenthesis: + if unmatched_close_paren_found(iParen): break - elif lObjects[iCurrent].get_lower_value() in lUntils: - if utils.token_is_close_parenthesis(iCurrent, lObjects): - if iOpenParenthesis == iCloseParenthesis: - utils.assign_token(lObjects, iCurrent, parser.close_parenthesis) - iCurrent += 1 - continue - else: - break - elif utils.token_is_comma(iCurrent, lObjects): - if iOpenParenthesis == iCloseParenthesis: + + if oDataStructure.get_current_token_lower_value() in lUntils: + if is_current_token_close_paren(oDataStructure): + oDataStructure.replace_current_token_with(parser.close_parenthesis) + oDataStructure.increment_current_index() + elif oDataStructure.current_token_lower_value_is(","): + if iParen == 0: break else: - utils.assign_token(lObjects, iCurrent, parser.comma) - iCurrent += 1 + oDataStructure.replace_current_token_with(parser.comma) else: break else: - iPrevious = iCurrent - for oToken in [external_name, bit_string_literal]: - iCurrent = oToken.detect(iCurrent, lObjects) - if iCurrent != iPrevious: - continue - if iCurrent != iPrevious: + if external_name.detect(oDataStructure): continue - utils.assign_special_tokens(lObjects, iCurrent, oType) - iCurrent += 1 - return iCurrent + elif bit_string_literal.detect(oDataStructure): + continue + elif character_literal.detect(oDataStructure): + continue + + utils.assign_special_tokens(oDataStructure, oType) + oDataStructure.increment_current_index() + + +def update_paren_counter(iParen, oDataStructure): + if is_current_token_open_paren(oDataStructure): + return iParen + 1 + elif is_current_token_close_paren(oDataStructure): + return iParen - 1 + return iParen + + +def unmatched_close_paren_found(iParen): + return iParen == -1 + +def is_current_token_open_paren(oDataStructure): + return oDataStructure.current_token_lower_value_is("(") + +def is_current_token_close_paren(oDataStructure): + return oDataStructure.current_token_lower_value_is(")") diff --git a/vsg/vhdlFile/classify/external_constant_name.py b/vsg/vhdlFile/classify/external_constant_name.py index 1703a1c41..56f854ab9 100644 --- a/vsg/vhdlFile/classify/external_constant_name.py +++ b/vsg/vhdlFile/classify/external_constant_name.py @@ -6,16 +6,16 @@ from vsg.vhdlFile.classify import subtype_indication -def detect(iToken, lObjects): +def detect(oDataStructure): """ external_constant_name ::= << constant external_pathname : subtype_indication >> """ - if utils.are_next_consecutive_tokens(["<<", "constant"], iToken, lObjects): - return classify(iToken, lObjects) - - return iToken + if oDataStructure.are_next_consecutive_tokens(["<<", "constant"]): + classify(iToken, lObjects) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/external_name.py b/vsg/vhdlFile/classify/external_name.py index 7fd6fc77a..25812d7b6 100644 --- a/vsg/vhdlFile/classify/external_name.py +++ b/vsg/vhdlFile/classify/external_name.py @@ -10,7 +10,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ external_name ::= external_constant_name @@ -18,16 +18,10 @@ def detect(iToken, lObjects): | external_variable_name """ - iReturn = external_constant_name.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if external_constant_name.detect(oDataStructure): + return True - iReturn = external_signal_name.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if external_signal_name.detect(oDataStructure): + return True - iReturn = external_variable_name.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn - - return iToken + return external_variable_name.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/external_signal_name.py b/vsg/vhdlFile/classify/external_signal_name.py index bc8703fa7..ac06f40ce 100644 --- a/vsg/vhdlFile/classify/external_signal_name.py +++ b/vsg/vhdlFile/classify/external_signal_name.py @@ -6,16 +6,16 @@ from vsg.vhdlFile.classify import subtype_indication -def detect(iToken, lObjects): +def detect(oDataStructure): """ external_signal_name ::= << signal external_pathname : subtype_indication >> """ - if utils.are_next_consecutive_tokens(["<<", "signal"], iToken, lObjects): - return classify(iToken, lObjects) - - return iToken + if oDataStructure.are_next_consecutive_tokens(["<<", "signal"]): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/external_variable_name.py b/vsg/vhdlFile/classify/external_variable_name.py index bbb81904e..ab16fe036 100644 --- a/vsg/vhdlFile/classify/external_variable_name.py +++ b/vsg/vhdlFile/classify/external_variable_name.py @@ -6,16 +6,16 @@ from vsg.vhdlFile.classify import subtype_indication -def detect(iToken, lObjects): +def detect(oDataStructure): """ external_variable_name ::= << variable external_pathname : subtype_indication >> """ - if utils.are_next_consecutive_tokens(["<<", "variable"], iToken, lObjects): - return classify(iToken, lObjects) - - return iToken + if oDataStructure.are_next_consecutive_tokens(["<<", "variable"]): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/identifier_list.py b/vsg/vhdlFile/classify/identifier_list.py index ceeb1e7ce..dec3e52ec 100644 --- a/vsg/vhdlFile/classify/identifier_list.py +++ b/vsg/vhdlFile/classify/identifier_list.py @@ -4,18 +4,12 @@ from vsg.vhdlFile import utils -def classify_until(lUntils, iToken, lObjects, oToken=token.identifier): +def classify_until(lUntils, oDataStructure, oToken=token.identifier): """ identifier_list ::= identifier { , identifier } """ - iEnd = len(lObjects) - 1 - iCurrent = iToken - while not utils.is_next_token_one_of(lUntils, iCurrent, lObjects): - if iCurrent == iEnd: - return iCurrent - iCurrent = utils.assign_next_token_if_not(",", oToken, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if(",", token.comma, iCurrent, lObjects) - - return iCurrent + while not oDataStructure.is_next_token_one_of(lUntils): + oDataStructure.replace_next_token_with_if_not(",", oToken) + oDataStructure.replace_next_token_with_if(",", token.comma) diff --git a/vsg/vhdlFile/classify/index_constraint.py b/vsg/vhdlFile/classify/index_constraint.py index 869b61a25..79cf9a202 100644 --- a/vsg/vhdlFile/classify/index_constraint.py +++ b/vsg/vhdlFile/classify/index_constraint.py @@ -5,24 +5,24 @@ from vsg.vhdlFile.classify import discrete_range -def detect(iToken, lObjects): +def detect(oDataStructure): """ index_constraint ::= ( discrete_range { , discrete_range } ) """ - if utils.is_next_token("(", iToken, lObjects): - iCurrent = utils.find_next_token(iToken, lObjects) + 1 - if discrete_range.detect(iCurrent, lObjects): + oDataStructure.align_seek_index() + if oDataStructure.is_next_seek_token("("): + oDataStructure.increment_seek_index() + if discrete_range.detect(oDataStructure): return True return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.open_parenthesis) - while not utils.is_next_token(")", iCurrent, lObjects): - iCurrent = discrete_range.classify_until([","], iCurrent, lObjects) - iCurrent = utils.assign_next_token_if(",", token.comma, iCurrent, lObjects) + while not oDataStructure.is_next_token(")"): + discrete_range.classify_until([","], oDataStructure) + oDataStructure.replace_next_token_with_if(",", token.comma) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) - return iCurrent + oDataStructure.replace_next_token_required(")", token.close_parenthesis) diff --git a/vsg/vhdlFile/classify/prefix.py b/vsg/vhdlFile/classify/prefix.py new file mode 100644 index 000000000..a905eb3ec --- /dev/null +++ b/vsg/vhdlFile/classify/prefix.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +from vsg import parser +from vsg.vhdlFile import utils + + +def classify(oDataStructure, oToken): + oDataStructure.replace_next_token_with(oToken.name) + + if oDataStructure.is_next_seek_token("("): + oDataStructure.replace_next_token_with(open_parenthesis) + utils.replace_tokens_until_matching_closing_paren(parser.todo, oDataStructure) + oDataStructure.replace_next_token_with(lObjects, iCurrent, parser.close_parenthesis) diff --git a/vsg/vhdlFile/classify/range.py b/vsg/vhdlFile/classify/range.py index 19f113558..1d3f6e6cb 100644 --- a/vsg/vhdlFile/classify/range.py +++ b/vsg/vhdlFile/classify/range.py @@ -1,68 +1,22 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile import utils +from vsg.vhdlFile.classify import attribute_name - -def detect(iToken, lObjects): +def detect(oDataStructure): """ range ::= - range_attribute_name + *range*_attribute_name | simple_expression direction simple_expression """ - if check_for_range_attribute_name(iToken, lObjects): + if attribute_name.detect(oDataStructure): return True - return detect_direction(iToken, lObjects) + return detect_direction(oDataStructure) -def check_for_range_attribute_name(iToken, lObjects): - if single_token_enclosed_in_parenthesis(iToken, lObjects): +def detect_direction(oDataStructure): + if oDataStructure.does_string_exist_before_matching_close_parenthesis("downto"): return True - - iParens = 0 - for iIndex in range(iToken, len(lObjects)): - iParens = utils.update_paren_counter(iIndex, lObjects, iParens) - - if token_is_matching_close_parenthesis(iParens): - return False - if token_is_tic(iParens, iIndex, lObjects): - return True - - return False - - -def single_token_enclosed_in_parenthesis(iToken, lObjects): - return utils.are_next_consecutive_tokens([None, ")"], iToken, lObjects) - - -def token_is_matching_close_parenthesis(iParens): - if iParens == -1: - return True - return False - - -def check_for_todo_token(iIndex, lObjects): - if utils.token_is_whitespace_or_comment(lObjects[iIndex]): - return False - return True - - -def token_is_tic(iParens, iIndex, lObjects): - if iParens == 0 and utils.object_value_is(lObjects, iIndex, "'"): - return True - - -def detect_direction(iToken, lObjects): - iParens = 0 - for iIndex in range(iToken, len(lObjects)): - iParens = utils.update_paren_counter(iIndex, lObjects, iParens) - if iParens == -1: - return False - if check_for_direction(iParens, iIndex, lObjects): - return True - return False - - -def check_for_direction(iParens, iIndex, lObjects): - if iParens == 0 and utils.is_next_token_one_of(["downto", "to"], iIndex, lObjects): + if oDataStructure.does_string_exist_before_matching_close_parenthesis("to"): return True return False diff --git a/vsg/vhdlFile/classify/range_constraint.py b/vsg/vhdlFile/classify/range_constraint.py index c47a68666..346127cc5 100644 --- a/vsg/vhdlFile/classify/range_constraint.py +++ b/vsg/vhdlFile/classify/range_constraint.py @@ -5,15 +5,16 @@ from vsg.vhdlFile import utils -def detect(iToken, lObjects): +def detect(oDataStructure): """ range_constraint ::= **range** range """ - if utils.is_next_token("range", iToken, lObjects): - return classify(iToken, lObjects) + if oDataStructure.is_next_token("range"): + classify(oDataStructure) + return True - return iToken + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/record_constraint.py b/vsg/vhdlFile/classify/record_constraint.py index 88b9320ac..101ed07c1 100644 --- a/vsg/vhdlFile/classify/record_constraint.py +++ b/vsg/vhdlFile/classify/record_constraint.py @@ -5,16 +5,18 @@ from vsg.vhdlFile.classify import record_element_constraint -def detect(iToken, lObjects): +def detect(oDataStructure): """ record_constraint ::= ( record_element_constraint { , record_element_constraint } ) """ - if utils.is_next_token("(", iToken, lObjects): - iTemp = utils.find_next_token(iToken, lObjects) + 1 - if record_element_constraint.detect(iTemp, lObjects): - return classify(iToken, lObjects) - return iToken + oDataStructure.align_seek_index() + if oDataStructure.is_next_seek_token("("): + oDataStructure.increment_seek_index() + if record_element_constraint.detect(oDataStructure): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/record_element_constraint.py b/vsg/vhdlFile/classify/record_element_constraint.py index 1d8e8accc..2db17b427 100644 --- a/vsg/vhdlFile/classify/record_element_constraint.py +++ b/vsg/vhdlFile/classify/record_element_constraint.py @@ -5,14 +5,14 @@ from vsg.vhdlFile.classify import element_constraint -def detect(iToken, lObjects): +def detect(oDataStructure): """ record_element_constraint ::= record_element_simple_name element_constraint """ - if not utils.is_next_token("(", iToken, lObjects): - iTemp = utils.find_next_token(iToken, lObjects) + 1 - if utils.is_next_token("(", iTemp, lObjects): + if not oDataStructure.is_next_seek_token("("): + oDataStructure.increment_seek_index() + if oDataStructure.is_next_seek_token("("): return True return False diff --git a/vsg/vhdlFile/classify/resolution_indication.py b/vsg/vhdlFile/classify/resolution_indication.py index e27b32425..8946e50aa 100644 --- a/vsg/vhdlFile/classify/resolution_indication.py +++ b/vsg/vhdlFile/classify/resolution_indication.py @@ -5,16 +5,20 @@ from vsg.vhdlFile import utils -def detect(iToken, lObjects): +def detect(oDataStructure): """ resolution_indication ::= resolution_function_name | ( element_resolution ) """ - if detect_element_resolution(iToken, lObjects): - return classify_element_resolution(iToken, lObjects) - elif detect_resolution_function_name(iToken, lObjects): - return classify_resolution_function_name(iToken, lObjects) - return iToken + oDataStructure.advance_seek_index_to_current_index() + if detect_element_resolution(oDataStructure): + classify_element_resolution(oDataStructure) + return True + elif detect_resolution_function_name(oDataStructure): + classify_resolution_function_name(oDataStructure) + return True + oDataStructure.align_seek_index() + return False def classify_element_resolution(iToken, lObjects): @@ -29,23 +33,19 @@ def classify_resolution_function_name(iToken, lObjects): return utils.assign_next_token(token.resolution_function_name, iToken, lObjects) -def detect_element_resolution(iToken, lObjects): - if utils.is_next_token("(", iToken, lObjects): +def detect_element_resolution(oDataStructure): + if oDataStructure.is_next_seek_token("("): return True return False -def detect_resolution_function_name(iToken, lObjects): - if detect_escape_value(iToken, lObjects): - return False - return True +def detect_resolution_function_name(oDataStructure): + return not detect_escape_value(oDataStructure) lEscapeValues = ["(", ")", ";", ":=", "range", "bus", "is", "open", "'", ">>"] -def detect_escape_value(iToken, lObjects): - iTemp = utils.find_next_token(iToken, lObjects) + 1 - if utils.is_next_token_one_of(lEscapeValues, iTemp, lObjects): - return True - return False +def detect_escape_value(oDataStructure): + oDataStructure.increment_seek_index() + return oDataStructure.is_next_seek_token_one_of(lEscapeValues) diff --git a/vsg/vhdlFile/classify/signal_declaration.py b/vsg/vhdlFile/classify/signal_declaration.py index 45ce5f9e8..35d29b471 100644 --- a/vsg/vhdlFile/classify/signal_declaration.py +++ b/vsg/vhdlFile/classify/signal_declaration.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg.token import signal_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( expression, identifier_list, @@ -22,19 +21,19 @@ def detect(oDataStructure): return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("signal", token.signal_keyword, iToken, lObjects) - iCurrent = identifier_list.classify_until([":"], iCurrent, lObjects, token.identifier) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.signal_keyword) - iCurrent = subtype_indication.classify(iCurrent, lObjects) + identifier_list.classify_until([":"], oDataStructure, token.identifier) - iCurrent = signal_kind.detect(iToken, lObjects) + oDataStructure.replace_next_token_required(":", token.colon) - if utils.is_next_token(":=", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(":=", token.assignment_operator, iCurrent, lObjects) - iCurrent = expression.classify_until([";"], iCurrent, lObjects) + subtype_indication.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + signal_kind.detect(oDataStructure) - return iCurrent + if oDataStructure.is_next_token(":="): + oDataStructure.replace_next_token_with(token.assignment_operator) + expression.classify_until([";"], oDataStructure) + + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/signal_kind.py b/vsg/vhdlFile/classify/signal_kind.py index f77c958a3..dbf3bf865 100644 --- a/vsg/vhdlFile/classify/signal_kind.py +++ b/vsg/vhdlFile/classify/signal_kind.py @@ -4,22 +4,18 @@ from vsg.vhdlFile import utils -def detect(iToken, lObjects): +def detect(oDataStructure): """ signal_kind ::= register | bus """ + oDataStructure.align_seek_index() + if oDataStructure.is_next_seek_token_one_of(["register", "bus"]): + classify(oDataStructure) + return True + return False - if utils.is_next_token("register", iToken, lObjects): - return classify(iToken, lObjects) - elif utils.is_next_token("bus", iToken, lObjects): - return classify(iToken, lObjects) - return iToken - - -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_if("register", token.register_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("bus", token.bus_keyword, iToken, lObjects) - - return iCurrent +def classify(oDataStructure): + oDataStructure.replace_next_token_with_if("register", token.register_keyword) + oDataStructure.replace_next_token_with_if("bus", token.bus_keyword) diff --git a/vsg/vhdlFile/classify/signature.py b/vsg/vhdlFile/classify/signature.py index 75c216145..27c12eee7 100644 --- a/vsg/vhdlFile/classify/signature.py +++ b/vsg/vhdlFile/classify/signature.py @@ -5,17 +5,17 @@ from vsg.vhdlFile.classify import type_mark -def detect(iToken, lObjects): +def detect(oDataStructure): """ signature ::= **[** [ type_mark { , type_mark } ] [ return type_mark ] **]** NOTE: The [ and ] enclosed by ** are required if the signature is provided. """ - if utils.is_next_token("[", iToken, lObjects): - return classify(iToken, lObjects) - - return iToken + if oDataStructure.is_next_seek_token("["): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/subtype_indication.py b/vsg/vhdlFile/classify/subtype_indication.py index 8272663c5..61eaa70d6 100644 --- a/vsg/vhdlFile/classify/subtype_indication.py +++ b/vsg/vhdlFile/classify/subtype_indication.py @@ -4,14 +4,11 @@ from vsg.vhdlFile.classify import constraint, resolution_indication, type_mark -def classify(iToken, lObjects): +def classify(oDataStructure): """ subtype_indication ::= [ resolution_indication ] type_mark [ constraint ] """ - - iCurrent = resolution_indication.detect(iToken, lObjects) - iCurrent = utils.find_next_non_whitespace_token(iCurrent, lObjects) - iCurrent = type_mark.classify(iCurrent, lObjects) - iCurrent = constraint.detect(iCurrent, lObjects) - return iCurrent + resolution_indication.detect(oDataStructure) + type_mark.classify(oDataStructure) + constraint.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/type_mark.py b/vsg/vhdlFile/classify/type_mark.py index 6104ad89c..22d6b51fa 100644 --- a/vsg/vhdlFile/classify/type_mark.py +++ b/vsg/vhdlFile/classify/type_mark.py @@ -6,16 +6,14 @@ from vsg.vhdlFile.classify import attribute_name -def classify(iToken, lObjects): +def classify(oDataStructure): """ type_mark ::= *type*_name | *subtype*_name """ - if attribute_name.detect(iToken, lObjects): - return attribute_name.classify(iToken, lObjects) + if attribute_name.detect(oDataStructure): + return attribute_name.classify(oDataStructure) - iCurrent = utils.assign_next_token(token.name, iToken, lObjects) - - return iCurrent + oDataStructure.replace_next_token_with(token.name) diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 35f3cc9b8..83016e267 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile import utils +from vsg.token import exponent def classify_selected_name(oDataStructure, token): @@ -86,3 +87,83 @@ def classify_production(production, iToken, lObjects): if iPrevious == iCurrent: break return iCurrent + + +def assign_special_tokens(oDataStructure, oType): + sValue = oDataStructure.get_current_token_lower_value() + if sValue == ")": + assign_token(lObjects, iCurrent, parser.close_parenthesis) + elif sValue == "(": + assign_token(lObjects, iCurrent, parser.open_parenthesis) + elif sValue == "-": + if isinstance(lObjects[iCurrent - 1], exponent.e_keyword): + assign_token(lObjects, iCurrent, exponent.minus_sign) + else: + assign_token(lObjects, iCurrent, parser.todo) + elif sValue == "+": + if isinstance(lObjects[iCurrent - 1], exponent.e_keyword): + assign_token(lObjects, iCurrent, exponent.plus_sign) + else: + assign_token(lObjects, iCurrent, parser.todo) + elif sValue == "*": + assign_token(lObjects, iCurrent, parser.todo) + elif sValue == "**": + assign_token(lObjects, iCurrent, parser.todo) + elif sValue == "/": + assign_token(lObjects, iCurrent, parser.todo) + elif sValue == "downto": + assign_token(lObjects, iCurrent, direction.downto) + elif sValue == "to": + assign_token(lObjects, iCurrent, direction.to) + elif sValue == "others": + assign_token(lObjects, iCurrent, choice.others_keyword) + elif sValue == "=>": + assign_token(lObjects, iCurrent, element_association.assignment) + elif sValue == "e": + if lObjects[iCurrent + 1].get_value().isdigit() or lObjects[iCurrent + 1].get_value() == "-" or lObjects[iCurrent + 1].get_value() == "+": + assign_token(lObjects, iCurrent, exponent.e_keyword) + else: + assign_token(lObjects, iCurrent, oType) + elif sValue == "=": + assign_token(lObjects, iCurrent, relational_operator.equal) + elif sValue == "/=": + assign_token(lObjects, iCurrent, relational_operator.not_equal) + elif sValue == "<": + assign_token(lObjects, iCurrent, relational_operator.less_than) + elif sValue == "<=": + assign_token(lObjects, iCurrent, relational_operator.less_than_or_equal) + elif sValue == ">": + assign_token(lObjects, iCurrent, relational_operator.greater_than) + elif sValue == ">=": + assign_token(lObjects, iCurrent, relational_operator.greater_than_or_equal) + elif sValue == "?=": + assign_token(lObjects, iCurrent, relational_operator.question_equal) + elif sValue == "?/=": + assign_token(lObjects, iCurrent, relational_operator.question_not_equal) + elif sValue == "?<": + assign_token(lObjects, iCurrent, relational_operator.question_less_than) + elif sValue == "?<=": + assign_token(lObjects, iCurrent, relational_operator.question_less_than_or_equal) + elif sValue == "?>": + assign_token(lObjects, iCurrent, relational_operator.question_greater_than) + elif sValue == "?>=": + assign_token(lObjects, iCurrent, relational_operator.question_greater_than_or_equal) + + elif exponent_detected(oDataStructure): + assign_token(lObjects, iCurrent, exponent.integer) + else: + oDataStructure.replace_current_token_with(oType) + + +def exponent_detected(oDataStructure): + iPreviousIndex = oDataStructure.get_current_index() - 1 + oToken = oDataStructure.lAllObjects[oDataStructure.get_current_index() - 1] + if isinstance(oToken, exponent.e_keyword): + return True + if isinstance(oToken, exponent.plus_sign): + return True + if isinstance(oToken, exponent.minus_sign): + return True + return False + + diff --git a/vsg/vhdlFile/utils.py b/vsg/vhdlFile/utils.py index 8944b5f63..ac02ed0b1 100644 --- a/vsg/vhdlFile/utils.py +++ b/vsg/vhdlFile/utils.py @@ -7,7 +7,6 @@ choice, direction, element_association, - exponent, predefined_attribute, relational_operator, ) @@ -856,82 +855,6 @@ def assignment_operator_found(iToken, lObjects): return False -def assign_special_tokens(lObjects, iCurrent, oType): - sValue = lObjects[iCurrent].get_lower_value() - if sValue == ")": - assign_token(lObjects, iCurrent, parser.close_parenthesis) - elif sValue == "(": - assign_token(lObjects, iCurrent, parser.open_parenthesis) - elif sValue == "-": - if isinstance(lObjects[iCurrent - 1], exponent.e_keyword): - assign_token(lObjects, iCurrent, exponent.minus_sign) - else: - assign_token(lObjects, iCurrent, parser.todo) - elif sValue == "+": - if isinstance(lObjects[iCurrent - 1], exponent.e_keyword): - assign_token(lObjects, iCurrent, exponent.plus_sign) - else: - assign_token(lObjects, iCurrent, parser.todo) - elif sValue == "*": - assign_token(lObjects, iCurrent, parser.todo) - elif sValue == "**": - assign_token(lObjects, iCurrent, parser.todo) - elif sValue == "/": - assign_token(lObjects, iCurrent, parser.todo) - elif sValue == "downto": - assign_token(lObjects, iCurrent, direction.downto) - elif sValue == "to": - assign_token(lObjects, iCurrent, direction.to) - elif sValue == "others": - assign_token(lObjects, iCurrent, choice.others_keyword) - elif sValue == "=>": - assign_token(lObjects, iCurrent, element_association.assignment) - elif sValue == "e": - if lObjects[iCurrent + 1].get_value().isdigit() or lObjects[iCurrent + 1].get_value() == "-" or lObjects[iCurrent + 1].get_value() == "+": - assign_token(lObjects, iCurrent, exponent.e_keyword) - else: - assign_token(lObjects, iCurrent, oType) - elif sValue == "=": - assign_token(lObjects, iCurrent, relational_operator.equal) - elif sValue == "/=": - assign_token(lObjects, iCurrent, relational_operator.not_equal) - elif sValue == "<": - assign_token(lObjects, iCurrent, relational_operator.less_than) - elif sValue == "<=": - assign_token(lObjects, iCurrent, relational_operator.less_than_or_equal) - elif sValue == ">": - assign_token(lObjects, iCurrent, relational_operator.greater_than) - elif sValue == ">=": - assign_token(lObjects, iCurrent, relational_operator.greater_than_or_equal) - elif sValue == "?=": - assign_token(lObjects, iCurrent, relational_operator.question_equal) - elif sValue == "?/=": - assign_token(lObjects, iCurrent, relational_operator.question_not_equal) - elif sValue == "?<": - assign_token(lObjects, iCurrent, relational_operator.question_less_than) - elif sValue == "?<=": - assign_token(lObjects, iCurrent, relational_operator.question_less_than_or_equal) - elif sValue == "?>": - assign_token(lObjects, iCurrent, relational_operator.question_greater_than) - elif sValue == "?>=": - assign_token(lObjects, iCurrent, relational_operator.question_greater_than_or_equal) - - elif exponent_detected(lObjects, iCurrent): - assign_token(lObjects, iCurrent, exponent.integer) - else: - assign_token(lObjects, iCurrent, oType) - - -def exponent_detected(lObjects, iCurrent): - if isinstance(lObjects[iCurrent - 1], exponent.e_keyword): - return True - if isinstance(lObjects[iCurrent - 1], exponent.plus_sign): - return True - if isinstance(lObjects[iCurrent - 1], exponent.minus_sign): - return True - return False - - def classify_predefined_types(lObjects, iCurrent): if not isinstance(lObjects[iCurrent], parser.todo): return From 4fbc74d5b8631efa4c7cefb75450bb8a47a26731 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 8 Feb 2025 14:07:13 -0600 Subject: [PATCH 023/124] Refactoring. --- vsg/vhdlFile/classify/array_constraint.py | 1 - vsg/vhdlFile/classify/attribute_name.py | 6 +++--- vsg/vhdlFile/classify/expression.py | 18 ++++-------------- .../classify/external_constant_name.py | 3 +-- vsg/vhdlFile/classify/external_name.py | 3 --- vsg/vhdlFile/classify/external_signal_name.py | 1 - .../classify/external_variable_name.py | 1 - vsg/vhdlFile/classify/identifier_list.py | 1 - vsg/vhdlFile/classify/index_constraint.py | 1 - vsg/vhdlFile/classify/prefix.py | 2 +- vsg/vhdlFile/classify/range.py | 2 +- vsg/vhdlFile/classify/range_constraint.py | 1 - vsg/vhdlFile/classify/signal_kind.py | 1 - vsg/vhdlFile/classify/signature.py | 5 +---- vsg/vhdlFile/classify/subtype_indication.py | 3 ++- vsg/vhdlFile/classify/type_mark.py | 2 -- vsg/vhdlFile/classify/utils.py | 10 ++++++++++ 17 files changed, 23 insertions(+), 38 deletions(-) diff --git a/vsg/vhdlFile/classify/array_constraint.py b/vsg/vhdlFile/classify/array_constraint.py index 00c5f92e4..d4c59ae25 100644 --- a/vsg/vhdlFile/classify/array_constraint.py +++ b/vsg/vhdlFile/classify/array_constraint.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg.token import array_constraint as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import array_element_constraint, index_constraint diff --git a/vsg/vhdlFile/classify/attribute_name.py b/vsg/vhdlFile/classify/attribute_name.py index 23283d907..696f76ade 100644 --- a/vsg/vhdlFile/classify/attribute_name.py +++ b/vsg/vhdlFile/classify/attribute_name.py @@ -2,7 +2,6 @@ from vsg import parser from vsg.token import attribute_name as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, prefix, signature @@ -18,7 +17,7 @@ def detect(oDataStructure): skip_prefix(oDataStructure) # Check for signature - if oDataStructure.is_next_seek_token("["): + if signature.detect(oDataStructure): return True # Check for tic @@ -36,7 +35,8 @@ def skip_prefix(oDataStructure): def classify(oDataStructure): prefix.classify(oDataStructure, token) - signature.detect(oDataStructure) + if signature.detect(oDataStructure): + signature.classify(oDataStructure) oDataStructure.replace_next_token_required("'", token.tic) oDataStructure.replace_next_token_with(token.attribute) diff --git a/vsg/vhdlFile/classify/expression.py b/vsg/vhdlFile/classify/expression.py index 2f057af24..b510c7b69 100644 --- a/vsg/vhdlFile/classify/expression.py +++ b/vsg/vhdlFile/classify/expression.py @@ -23,11 +23,11 @@ def classify_until(lUntils, oDataStructure, oType=parser.todo): while oDataStructure.advance_to_next_token(): iParen = update_paren_counter(iParen, oDataStructure) - if unmatched_close_paren_found(iParen): + if utils.unmatched_close_paren_found(iParen): break if oDataStructure.get_current_token_lower_value() in lUntils: - if is_current_token_close_paren(oDataStructure): + if utils.is_current_token_close_paren(oDataStructure): oDataStructure.replace_current_token_with(parser.close_parenthesis) oDataStructure.increment_current_index() elif oDataStructure.current_token_lower_value_is(","): @@ -50,18 +50,8 @@ def classify_until(lUntils, oDataStructure, oType=parser.todo): def update_paren_counter(iParen, oDataStructure): - if is_current_token_open_paren(oDataStructure): + if utils.is_current_token_open_paren(oDataStructure): return iParen + 1 - elif is_current_token_close_paren(oDataStructure): + elif utils.is_current_token_close_paren(oDataStructure): return iParen - 1 return iParen - - -def unmatched_close_paren_found(iParen): - return iParen == -1 - -def is_current_token_open_paren(oDataStructure): - return oDataStructure.current_token_lower_value_is("(") - -def is_current_token_close_paren(oDataStructure): - return oDataStructure.current_token_lower_value_is(")") diff --git a/vsg/vhdlFile/classify/external_constant_name.py b/vsg/vhdlFile/classify/external_constant_name.py index 56f854ab9..68a06f1fc 100644 --- a/vsg/vhdlFile/classify/external_constant_name.py +++ b/vsg/vhdlFile/classify/external_constant_name.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -from vsg import parser from vsg.token import external_constant_name as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import subtype_indication @@ -13,7 +12,7 @@ def detect(oDataStructure): """ if oDataStructure.are_next_consecutive_tokens(["<<", "constant"]): - classify(iToken, lObjects) + classify(oDataStructure) return True return False diff --git a/vsg/vhdlFile/classify/external_name.py b/vsg/vhdlFile/classify/external_name.py index 25812d7b6..d2e662d81 100644 --- a/vsg/vhdlFile/classify/external_name.py +++ b/vsg/vhdlFile/classify/external_name.py @@ -1,8 +1,5 @@ # -*- coding: utf-8 -*- -from vsg import parser -from vsg.token import direction -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( external_constant_name, external_signal_name, diff --git a/vsg/vhdlFile/classify/external_signal_name.py b/vsg/vhdlFile/classify/external_signal_name.py index ac06f40ce..faaf46e8a 100644 --- a/vsg/vhdlFile/classify/external_signal_name.py +++ b/vsg/vhdlFile/classify/external_signal_name.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -from vsg import parser from vsg.token import external_signal_name as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import subtype_indication diff --git a/vsg/vhdlFile/classify/external_variable_name.py b/vsg/vhdlFile/classify/external_variable_name.py index ab16fe036..20b807242 100644 --- a/vsg/vhdlFile/classify/external_variable_name.py +++ b/vsg/vhdlFile/classify/external_variable_name.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -from vsg import parser from vsg.token import external_variable_name as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import subtype_indication diff --git a/vsg/vhdlFile/classify/identifier_list.py b/vsg/vhdlFile/classify/identifier_list.py index dec3e52ec..a2102b8a9 100644 --- a/vsg/vhdlFile/classify/identifier_list.py +++ b/vsg/vhdlFile/classify/identifier_list.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg.token import identifier_list as token -from vsg.vhdlFile import utils def classify_until(lUntils, oDataStructure, oToken=token.identifier): diff --git a/vsg/vhdlFile/classify/index_constraint.py b/vsg/vhdlFile/classify/index_constraint.py index 79cf9a202..f6b0aaba1 100644 --- a/vsg/vhdlFile/classify/index_constraint.py +++ b/vsg/vhdlFile/classify/index_constraint.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg.token import index_constraint as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import discrete_range diff --git a/vsg/vhdlFile/classify/prefix.py b/vsg/vhdlFile/classify/prefix.py index a905eb3ec..a5f83926d 100644 --- a/vsg/vhdlFile/classify/prefix.py +++ b/vsg/vhdlFile/classify/prefix.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from vsg import parser -from vsg.vhdlFile import utils +from vsg.vhdlFile.classify import utils def classify(oDataStructure, oToken): diff --git a/vsg/vhdlFile/classify/range.py b/vsg/vhdlFile/classify/range.py index 1d3f6e6cb..48d9cdd52 100644 --- a/vsg/vhdlFile/classify/range.py +++ b/vsg/vhdlFile/classify/range.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import attribute_name + def detect(oDataStructure): """ range ::= diff --git a/vsg/vhdlFile/classify/range_constraint.py b/vsg/vhdlFile/classify/range_constraint.py index 346127cc5..d720203a6 100644 --- a/vsg/vhdlFile/classify/range_constraint.py +++ b/vsg/vhdlFile/classify/range_constraint.py @@ -13,7 +13,6 @@ def detect(oDataStructure): if oDataStructure.is_next_token("range"): classify(oDataStructure) return True - return False diff --git a/vsg/vhdlFile/classify/signal_kind.py b/vsg/vhdlFile/classify/signal_kind.py index dbf3bf865..cf8c87403 100644 --- a/vsg/vhdlFile/classify/signal_kind.py +++ b/vsg/vhdlFile/classify/signal_kind.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg.token import signal_kind as token -from vsg.vhdlFile import utils def detect(oDataStructure): diff --git a/vsg/vhdlFile/classify/signature.py b/vsg/vhdlFile/classify/signature.py index 27c12eee7..7915d539a 100644 --- a/vsg/vhdlFile/classify/signature.py +++ b/vsg/vhdlFile/classify/signature.py @@ -12,10 +12,7 @@ def detect(oDataStructure): NOTE: The [ and ] enclosed by ** are required if the signature is provided. """ - if oDataStructure.is_next_seek_token("["): - classify(oDataStructure) - return True - return False + return oDataStructure.is_next_seek_token("[") def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/subtype_indication.py b/vsg/vhdlFile/classify/subtype_indication.py index 61eaa70d6..e43613ec2 100644 --- a/vsg/vhdlFile/classify/subtype_indication.py +++ b/vsg/vhdlFile/classify/subtype_indication.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import constraint, resolution_indication, type_mark @@ -10,5 +9,7 @@ def classify(oDataStructure): [ resolution_indication ] type_mark [ constraint ] """ resolution_indication.detect(oDataStructure) + type_mark.classify(oDataStructure) + constraint.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/type_mark.py b/vsg/vhdlFile/classify/type_mark.py index 22d6b51fa..a1cfc613a 100644 --- a/vsg/vhdlFile/classify/type_mark.py +++ b/vsg/vhdlFile/classify/type_mark.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- -from vsg import parser from vsg.token import type_mark as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import attribute_name diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 83016e267..042de08a0 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -167,3 +167,13 @@ def exponent_detected(oDataStructure): return False +def is_current_token_open_paren(oDataStructure): + return oDataStructure.current_token_lower_value_is("(") + + +def is_current_token_close_paren(oDataStructure): + return oDataStructure.current_token_lower_value_is(")") + + +def unmatched_close_paren_found(iParen): + return iParen == -1 From 66b58d611fede33e464d51410174fa15e7bf9679 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 8 Feb 2025 14:08:35 -0600 Subject: [PATCH 024/124] Style updates. --- vsg/data_structure.py | 4 ++-- vsg/vhdlFile/classify/array_constraint.py | 3 +-- vsg/vhdlFile/classify/discrete_range.py | 5 ++--- vsg/vhdlFile/classify/expression.py | 7 ++++++- vsg/vhdlFile/classify/utils.py | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 11b0cb3da..7efad5134 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -52,7 +52,7 @@ def does_seek_token_match_regex(self, oRegex): if oRegex.fullmatch(self.get_seek_token_lower_value()) is not None: return True return False - + def does_string_exist_before_string(self, sFirst, sSecond): for oToken in self.lAllObjects[self.iCurrent : :]: if oToken.lower_value == sSecond: @@ -62,7 +62,7 @@ def does_string_exist_before_string(self, sFirst, sSecond): def does_string_exist_before_matching_close_parenthesis(self, sString): iParen = 0 - for oToken in self.lAllObjects[self.iSeek: :]: + for oToken in self.lAllObjects[self.iSeek : :]: if iParen == 0 and oToken.lower_value == sString: return True if oToken.lower_value == "(": diff --git a/vsg/vhdlFile/classify/array_constraint.py b/vsg/vhdlFile/classify/array_constraint.py index d4c59ae25..8a4c194af 100644 --- a/vsg/vhdlFile/classify/array_constraint.py +++ b/vsg/vhdlFile/classify/array_constraint.py @@ -30,11 +30,10 @@ def detect_discrete_subtype_indication(oDataStructure): def open_detected(oDataStructure): - return oDataStructure.are_next_consecutive_tokens(["(", "open"]) + return oDataStructure.are_next_consecutive_tokens(["(", "open"]) def classify_open(oDataStructure): oDataStructure.replace_next_token_with(token.open_parenthesis) oDataStructure.replace_next_token_with(token.open_keyword) oDataStructure.replace_next_token_required(")", token.close_parenthesis) - diff --git a/vsg/vhdlFile/classify/discrete_range.py b/vsg/vhdlFile/classify/discrete_range.py index 41f2a8920..b25a7fcdb 100644 --- a/vsg/vhdlFile/classify/discrete_range.py +++ b/vsg/vhdlFile/classify/discrete_range.py @@ -30,9 +30,8 @@ def classify_until(lUntils, oDataStructure): iCloseParenthesis = 0 while not oDataStructure.is_next_token_one_of(lUntils): - -# if iCurrent == iPrevious: -# utils.print_missing_error_message(lUntils, iToken, lObjects) + # if iCurrent == iPrevious: + # utils.print_missing_error_message(lUntils, iToken, lObjects) if oDataStructure.current_token_lower_value_is("("): iOpenParenthesis += 1 diff --git a/vsg/vhdlFile/classify/expression.py b/vsg/vhdlFile/classify/expression.py index b510c7b69..24e9f181b 100644 --- a/vsg/vhdlFile/classify/expression.py +++ b/vsg/vhdlFile/classify/expression.py @@ -1,7 +1,12 @@ # -*- coding: utf-8 -*- from vsg import parser -from vsg.vhdlFile.classify import bit_string_literal, character_literal, external_name, utils +from vsg.vhdlFile.classify import ( + bit_string_literal, + character_literal, + external_name, + utils, +) def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 042de08a0..e5c515234 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile import utils from vsg.token import exponent +from vsg.vhdlFile import utils def classify_selected_name(oDataStructure, token): From c54132643cef86122a8cd455c2fd7dcc3b6270aa Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 8 Feb 2025 14:31:29 -0600 Subject: [PATCH 025/124] Parsing constant_declaration. --- vsg/parser.py | 8 +-- vsg/vhdlFile/classify/constant_declaration.py | 20 +++--- vsg/vhdlFile/classify/expression.py | 1 - vsg/vhdlFile/classify/utils.py | 61 ++++++++++--------- 4 files changed, 44 insertions(+), 46 deletions(-) diff --git a/vsg/parser.py b/vsg/parser.py index 61fa6a5bb..829b28749 100644 --- a/vsg/parser.py +++ b/vsg/parser.py @@ -439,8 +439,8 @@ class open_parenthesis(item): unique_id = parser : open_parenthesis """ - def __init__(self): - super().__init__("(") + def __init__(self, sString = "("): + super().__init__(sString) class close_parenthesis(item): @@ -448,8 +448,8 @@ class close_parenthesis(item): unique_id = parser : close_parenthesis """ - def __init__(self): - super().__init__(")") + def __init__(self, sString = ")"): + super().__init__(sString) class equal_sign(item): diff --git a/vsg/vhdlFile/classify/constant_declaration.py b/vsg/vhdlFile/classify/constant_declaration.py index e8bb030de..b84209f4f 100644 --- a/vsg/vhdlFile/classify/constant_declaration.py +++ b/vsg/vhdlFile/classify/constant_declaration.py @@ -17,20 +17,18 @@ def detect(oDataStructure): return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("constant", token.constant_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.constant_keyword) - iCurrent = identifier_list.classify_until([":"], iCurrent, lObjects, token.identifier) + identifier_list.classify_until([":"], oDataStructure, token.identifier) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) + oDataStructure.replace_next_token_required(":", token.colon) - iCurrent = subtype_indication.classify(iCurrent, lObjects) + subtype_indication.classify(oDataStructure) - if utils.is_next_token(":=", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(":=", token.assignment_operator, iCurrent, lObjects) + if oDataStructure.is_next_token(":="): + oDataStructure.replace_next_token_with(token.assignment_operator) - iCurrent = expression.classify_until([";"], iCurrent, lObjects) + expression.classify_until([";"], oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/expression.py b/vsg/vhdlFile/classify/expression.py index 24e9f181b..726a8ecf9 100644 --- a/vsg/vhdlFile/classify/expression.py +++ b/vsg/vhdlFile/classify/expression.py @@ -51,7 +51,6 @@ def classify_until(lUntils, oDataStructure, oType=parser.todo): continue utils.assign_special_tokens(oDataStructure, oType) - oDataStructure.increment_current_index() def update_paren_counter(iParen, oDataStructure): diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index e5c515234..db705e008 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.token import exponent +from vsg import parser +from vsg.token import exponent, direction from vsg.vhdlFile import utils @@ -92,65 +93,65 @@ def classify_production(production, iToken, lObjects): def assign_special_tokens(oDataStructure, oType): sValue = oDataStructure.get_current_token_lower_value() if sValue == ")": - assign_token(lObjects, iCurrent, parser.close_parenthesis) + oDataStructure.replace_current_token_with(parser.close_parenthesis) elif sValue == "(": - assign_token(lObjects, iCurrent, parser.open_parenthesis) + oDataStructure.replace_current_token_with(parser.open_parenthesis) elif sValue == "-": - if isinstance(lObjects[iCurrent - 1], exponent.e_keyword): - assign_token(lObjects, iCurrent, exponent.minus_sign) + if isinstance(oDataStructure.lAllObjects[oDataStructure.iCurrent - 1], exponent.e_keyword): + oDataStructure.replace_current_token_with(exponent.minus_sign) else: - assign_token(lObjects, iCurrent, parser.todo) + oDataStructure.replace_current_token_with(parser.todo) elif sValue == "+": if isinstance(lObjects[iCurrent - 1], exponent.e_keyword): - assign_token(lObjects, iCurrent, exponent.plus_sign) + oDataStructure.replace_current_token_with(exponent.plus_sign) else: - assign_token(lObjects, iCurrent, parser.todo) + oDataStructure.replace_current_token_with(parser.todo) elif sValue == "*": - assign_token(lObjects, iCurrent, parser.todo) + oDataStructure.replace_current_token_with(parser.todo) elif sValue == "**": - assign_token(lObjects, iCurrent, parser.todo) + oDataStructure.replace_current_token_with(parser.todo) elif sValue == "/": - assign_token(lObjects, iCurrent, parser.todo) + oDataStructure.replace_current_token_with(parser.todo) elif sValue == "downto": - assign_token(lObjects, iCurrent, direction.downto) + oDataStructure.replace_current_token_with(direction.downto) elif sValue == "to": - assign_token(lObjects, iCurrent, direction.to) + oDataStructure.replace_current_token_with(direction.to) elif sValue == "others": - assign_token(lObjects, iCurrent, choice.others_keyword) + oDataStructure.replace_current_token_with(choice.others_keyword) elif sValue == "=>": - assign_token(lObjects, iCurrent, element_association.assignment) + oDataStructure.replace_current_token_with(element_association.assignment) elif sValue == "e": if lObjects[iCurrent + 1].get_value().isdigit() or lObjects[iCurrent + 1].get_value() == "-" or lObjects[iCurrent + 1].get_value() == "+": - assign_token(lObjects, iCurrent, exponent.e_keyword) + oDataStructure.replace_current_token_with(exponent.e_keyword) else: - assign_token(lObjects, iCurrent, oType) + oDataStructure.replace_current_token_with(oType) elif sValue == "=": - assign_token(lObjects, iCurrent, relational_operator.equal) + oDataStructure.replace_current_token_with(relational_operator.equal) elif sValue == "/=": - assign_token(lObjects, iCurrent, relational_operator.not_equal) + oDataStructure.replace_current_token_with(relational_operator.not_equal) elif sValue == "<": - assign_token(lObjects, iCurrent, relational_operator.less_than) + oDataStructure.replace_current_token_with(relational_operator.less_than) elif sValue == "<=": - assign_token(lObjects, iCurrent, relational_operator.less_than_or_equal) + oDataStructure.replace_current_token_with(relational_operator.less_than_or_equal) elif sValue == ">": - assign_token(lObjects, iCurrent, relational_operator.greater_than) + oDataStructure.replace_current_token_with(relational_operator.greater_than) elif sValue == ">=": - assign_token(lObjects, iCurrent, relational_operator.greater_than_or_equal) + oDataStructure.replace_current_token_with(relational_operator.greater_than_or_equal) elif sValue == "?=": - assign_token(lObjects, iCurrent, relational_operator.question_equal) + oDataStructure.replace_current_token_with(relational_operator.question_equal) elif sValue == "?/=": - assign_token(lObjects, iCurrent, relational_operator.question_not_equal) + oDataStructure.replace_current_token_with(relational_operator.question_not_equal) elif sValue == "?<": - assign_token(lObjects, iCurrent, relational_operator.question_less_than) + oDataStructure.replace_current_token_with(relational_operator.question_less_than) elif sValue == "?<=": - assign_token(lObjects, iCurrent, relational_operator.question_less_than_or_equal) + oDataStructure.replace_current_token_with(relational_operator.question_less_than_or_equal) elif sValue == "?>": - assign_token(lObjects, iCurrent, relational_operator.question_greater_than) + oDataStructure.replace_current_token_with(relational_operator.question_greater_than) elif sValue == "?>=": - assign_token(lObjects, iCurrent, relational_operator.question_greater_than_or_equal) + oDataStructure.replace_current_token_with(relational_operator.question_greater_than_or_equal) elif exponent_detected(oDataStructure): - assign_token(lObjects, iCurrent, exponent.integer) + oDataStructure.replace_current_token_with(exponent.integer) else: oDataStructure.replace_current_token_with(oType) From d0128e8e4a7e0c13aa249c27a126a115848a60fb Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 8 Feb 2025 14:34:52 -0600 Subject: [PATCH 026/124] Refactoring. --- vsg/vhdlFile/classify/constant_declaration.py | 1 - 1 file changed, 1 deletion(-) diff --git a/vsg/vhdlFile/classify/constant_declaration.py b/vsg/vhdlFile/classify/constant_declaration.py index b84209f4f..bab9730ef 100644 --- a/vsg/vhdlFile/classify/constant_declaration.py +++ b/vsg/vhdlFile/classify/constant_declaration.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg.token import constant_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, subtype_indication From 7d84feb5add4e9de5c1e7d41b87ae6e3d9b87015 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 8 Feb 2025 14:37:08 -0600 Subject: [PATCH 027/124] Updating style. --- vsg/parser.py | 4 ++-- vsg/vhdlFile/classify/utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vsg/parser.py b/vsg/parser.py index 829b28749..a13781b21 100644 --- a/vsg/parser.py +++ b/vsg/parser.py @@ -439,7 +439,7 @@ class open_parenthesis(item): unique_id = parser : open_parenthesis """ - def __init__(self, sString = "("): + def __init__(self, sString="("): super().__init__(sString) @@ -448,7 +448,7 @@ class close_parenthesis(item): unique_id = parser : close_parenthesis """ - def __init__(self, sString = ")"): + def __init__(self, sString=")"): super().__init__(sString) diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index db705e008..3f06aad73 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from vsg import parser -from vsg.token import exponent, direction +from vsg.token import direction, exponent from vsg.vhdlFile import utils From e360b47a4e4595d7d02a2d45334619ec08326e43 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 8 Feb 2025 14:55:28 -0600 Subject: [PATCH 028/124] Parsing variable_declaration. --- vsg/vhdlFile/classify/range_constraint.py | 16 +++++++------- vsg/vhdlFile/classify/utils.py | 8 +++++++ vsg/vhdlFile/classify/variable_declaration.py | 21 +++++++++---------- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/vsg/vhdlFile/classify/range_constraint.py b/vsg/vhdlFile/classify/range_constraint.py index d720203a6..b02fd6ec7 100644 --- a/vsg/vhdlFile/classify/range_constraint.py +++ b/vsg/vhdlFile/classify/range_constraint.py @@ -2,7 +2,7 @@ from vsg import parser from vsg.token import range_constraint as token -from vsg.vhdlFile import utils +from vsg.vhdlFile.classify import utils def detect(oDataStructure): @@ -16,15 +16,13 @@ def detect(oDataStructure): return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("range", token.range_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.range_keyword) iParenCnt = 0 - while not utils.is_next_token_one_of([";", "units", ":="], iCurrent, lObjects): - iCurrent = utils.find_next_token(iCurrent, lObjects) - iParenCnt = utils.update_paren_counter(iCurrent, lObjects, iParenCnt) + while not oDataStructure.is_next_token_one_of([";", "units", ":="]): + iParenCnt = utils.update_paren_counter(iParenCnt, oDataStructure) if iParenCnt == -1: break - iCurrent = utils.assign_next_token(parser.todo, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_with(parser.todo) + oDataStructure.increment_current_index() diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 3f06aad73..13a6fa1f0 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -178,3 +178,11 @@ def is_current_token_close_paren(oDataStructure): def unmatched_close_paren_found(iParen): return iParen == -1 + + +def update_paren_counter(iParen, oDataStructure): + if is_current_token_open_paren(oDataStructure): + return iParen + 1 + if is_current_token_close_paren(oDataStructure): + return iParen - 1 + return iParen diff --git a/vsg/vhdlFile/classify/variable_declaration.py b/vsg/vhdlFile/classify/variable_declaration.py index 643adf1a9..aa1575a31 100644 --- a/vsg/vhdlFile/classify/variable_declaration.py +++ b/vsg/vhdlFile/classify/variable_declaration.py @@ -17,19 +17,18 @@ def detect(oDataStructure): return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_if("shared", token.shared_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("variable", token.variable_keyword, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with_if("shared", token.shared_keyword) + oDataStructure.replace_next_token_required("variable", token.variable_keyword) - iCurrent = identifier_list.classify_until([":"], iCurrent, lObjects, token.identifier) + identifier_list.classify_until([":"], oDataStructure, token.identifier) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) + oDataStructure.replace_next_token_required(":", token.colon) - iCurrent = subtype_indication.classify(iCurrent, lObjects) + subtype_indication.classify(oDataStructure) - if utils.is_next_token(":=", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(":=", token.assignment_operator, iCurrent, lObjects) - iCurrent = expression.classify_until([";"], iCurrent, lObjects) + if oDataStructure.is_next_token(":="): + oDataStructure.replace_next_token_with(token.assignment_operator) + expression.classify_until([";"], oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) From cf7282d514a69ae94baac004e0bb0d4916c21574 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 8 Feb 2025 22:29:31 -0600 Subject: [PATCH 029/124] Parsing process_statement. --- vsg/parser.py | 4 +- vsg/token/process_statement.py | 4 +- vsg/vhdlFile/classify/assertion_statement.py | 12 +-- vsg/vhdlFile/classify/case_statement.py | 12 +-- .../classify/conditional_signal_assignment.py | 10 +-- .../conditional_variable_assignment.py | 19 +++-- vsg/vhdlFile/classify/exit_statement.py | 15 ++-- vsg/vhdlFile/classify/if_statement.py | 12 +-- vsg/vhdlFile/classify/iteration_scheme.py | 10 +-- vsg/vhdlFile/classify/loop_statement.py | 29 ++++--- vsg/vhdlFile/classify/name.py | 34 ++++----- vsg/vhdlFile/classify/next_statement.py | 14 ++-- vsg/vhdlFile/classify/null_statement.py | 13 ++-- .../classify/procedure_call_statement.py | 46 +++++++----- .../classify/process_declarative_item.py | 75 +++++++------------ .../classify/process_declarative_part.py | 10 +-- .../classify/process_sensitivity_list.py | 9 +-- vsg/vhdlFile/classify/process_statement.py | 50 ++++++------- .../classify/process_statement_part.py | 10 +-- vsg/vhdlFile/classify/report_statement.py | 12 +-- vsg/vhdlFile/classify/return_statement.py | 15 ++-- .../classify/selected_signal_assignment.py | 8 +- .../classify/selected_variable_assignment.py | 9 +-- vsg/vhdlFile/classify/sensitivity_list.py | 30 +++----- vsg/vhdlFile/classify/sequential_statement.py | 67 +++++++---------- .../classify/signal_assignment_statement.py | 29 +++---- .../classify/simple_signal_assignment.py | 21 ++++-- .../classify/simple_variable_assignment.py | 21 ++++-- vsg/vhdlFile/classify/utils.py | 20 ++++- .../classify/variable_assignment_statement.py | 28 +++---- vsg/vhdlFile/classify/wait_statement.py | 17 +++-- 31 files changed, 327 insertions(+), 338 deletions(-) diff --git a/vsg/parser.py b/vsg/parser.py index a13781b21..c85c5c52a 100644 --- a/vsg/parser.py +++ b/vsg/parser.py @@ -430,8 +430,8 @@ class label_colon(colon): unique_id = parser : label_colon """ - def __init__(self): - super().__init__() + def __init__(self, sString=":"): + super().__init__(sString) class open_parenthesis(item): diff --git a/vsg/token/process_statement.py b/vsg/token/process_statement.py index 4cdbb7cd1..a3630fe3b 100644 --- a/vsg/token/process_statement.py +++ b/vsg/token/process_statement.py @@ -17,8 +17,8 @@ class label_colon(parser.label_colon): unique_id = process_statement : label_colon """ - def __init__(self): - super().__init__() + def __init__(self, sString=":"): + super().__init__(sString) class postponed_keyword(parser.keyword): diff --git a/vsg/vhdlFile/classify/assertion_statement.py b/vsg/vhdlFile/classify/assertion_statement.py index 3f76ffd6a..e041e3d01 100644 --- a/vsg/vhdlFile/classify/assertion_statement.py +++ b/vsg/vhdlFile/classify/assertion_statement.py @@ -1,18 +1,18 @@ # -*- coding: utf-8 -*- from vsg.token import assertion_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import assertion +from vsg.vhdlFile.classify import assertion, utils -def detect(iToken, lObjects): +def detect(oDataStructure): """ assertion_statement ::= [ label : ] assertion ; """ - if utils.keyword_found("assert", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if utils.keyword_found("assert", oDataStructure): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/case_statement.py b/vsg/vhdlFile/classify/case_statement.py index 11871e26b..b489668cd 100644 --- a/vsg/vhdlFile/classify/case_statement.py +++ b/vsg/vhdlFile/classify/case_statement.py @@ -1,11 +1,10 @@ # -*- coding: utf-8 -*- from vsg.token import case_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import case_statement_alternative, expression +from vsg.vhdlFile.classify import case_statement_alternative, expression, utils -def detect(iToken, lObjects): +def detect(oDataStructure): """ case_statement ::= [ *case*_label : ] @@ -14,9 +13,10 @@ def detect(iToken, lObjects): { case_statement_alternative } end case [ ? ] [ case_label ] ; """ - if utils.keyword_found("case", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if utils.keyword_found("case", oDataStructure): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/conditional_signal_assignment.py b/vsg/vhdlFile/classify/conditional_signal_assignment.py index c0b336230..3f919420c 100644 --- a/vsg/vhdlFile/classify/conditional_signal_assignment.py +++ b/vsg/vhdlFile/classify/conditional_signal_assignment.py @@ -7,19 +7,19 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ conditional_signal_assignment ::= conditional_waveform_assignment | conditional_force_assignment """ - if utils.is_next_token("when", iToken, lObjects): + if oDataStructure.is_next_token("when"): return False - if utils.find_in_next_n_tokens("if", 3, iToken, lObjects): + if oDataStructure.does_string_exist_in_next_n_tokens("if", 3): return False - if utils.find_in_range("<=", iToken, ";", lObjects): - if utils.find_in_range("when", iToken, ";", lObjects): + if oDataStructure.does_string_exist_before_string("<=", ";"): + if oDataStructure.does_string_exist_before_string("when", ";"): return True return False diff --git a/vsg/vhdlFile/classify/conditional_variable_assignment.py b/vsg/vhdlFile/classify/conditional_variable_assignment.py index 103556499..c279d1555 100644 --- a/vsg/vhdlFile/classify/conditional_variable_assignment.py +++ b/vsg/vhdlFile/classify/conditional_variable_assignment.py @@ -5,21 +5,30 @@ from vsg.vhdlFile.classify import conditional_expressions -def detect(iToken, lObjects): +def detect(oDataStructure): """ conditional_variable_assignment ::= target := conditional_expressions ; """ - if utils.is_next_token_one_of(["when", "if", "elsif", "else"], iToken, lObjects): + if oDataStructure.is_next_token_one_of(["when", "if", "elsif", "else"]): return False - if utils.find_in_range(":=", iToken, ";", lObjects): - if not utils.find_in_range("with", iToken, ";", lObjects): - if utils.find_in_range("when", iToken, ";", lObjects): + if oDataStructure.does_string_exist_before_string(":=", ";"): + if not oDataStructure.does_string_exist_before_string("with", ";"): + if oDataStructure.does_string_exist_before_string("when", ";"): return True return False +# if utils.is_next_token_one_of(["when", "if", "elsif", "else"], iToken, lObjects): +# return False +# if utils.find_in_range(":=", iToken, ";", lObjects): +# if not utils.find_in_range("with", iToken, ";", lObjects): +# if utils.find_in_range("when", iToken, ";", lObjects): +# return True +# return False + + def classify(iToken, lObjects): iCurrent = utils.assign_tokens_until(":=", token.target, iToken, lObjects) iCurrent = utils.assign_next_token_required(":=", token.assignment, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/exit_statement.py b/vsg/vhdlFile/classify/exit_statement.py index fc25f4309..3ff6b2995 100644 --- a/vsg/vhdlFile/classify/exit_statement.py +++ b/vsg/vhdlFile/classify/exit_statement.py @@ -1,22 +1,19 @@ # -*- coding: utf-8 -*- from vsg.token import exit_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import condition +from vsg.vhdlFile.classify import condition, utils -def detect(iToken, lObjects): +def detect(oDataStructure): """ exit_statement ::= [ label : ] exit [ loop_label ] [ when condition ] ; """ - if utils.are_next_consecutive_tokens([None, ":", "exit"], iToken, lObjects): - return classify(iToken, lObjects) - if utils.is_next_token("exit", iToken, lObjects): - return classify(iToken, lObjects) - - return iToken + if utils.keyword_found("exit", oDataStructure): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/if_statement.py b/vsg/vhdlFile/classify/if_statement.py index 8ab2488d4..7119612b8 100644 --- a/vsg/vhdlFile/classify/if_statement.py +++ b/vsg/vhdlFile/classify/if_statement.py @@ -1,11 +1,10 @@ # -*- coding: utf-8 -*- from vsg.token import if_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import condition, sequence_of_statements +from vsg.vhdlFile.classify import condition, sequence_of_statements, utils -def detect(iToken, lObjects): +def detect(oDataStructure): """ if_statement ::= [ if_label : ] @@ -18,9 +17,10 @@ def detect(iToken, lObjects): end if [ if_label ] ; """ - if utils.keyword_found("if", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if utils.keyword_found("if", oDataStructure): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/iteration_scheme.py b/vsg/vhdlFile/classify/iteration_scheme.py index 80cdf8f31..593825ce5 100644 --- a/vsg/vhdlFile/classify/iteration_scheme.py +++ b/vsg/vhdlFile/classify/iteration_scheme.py @@ -5,19 +5,19 @@ from vsg.vhdlFile.classify import condition, parameter_specification -def detect(iToken, lObjects): +def detect(oDataStructure): """ iteration_scheme ::= while condition | for *loop*_parameter_specification """ - if utils.find_in_next_n_tokens(";", 3, iToken, lObjects): + if oDataStructure.does_string_exist_in_next_n_tokens(";", 3): return False - if utils.find_in_next_n_tokens("else", 3, iToken, lObjects): + if oDataStructure.does_string_exist_in_next_n_tokens("else", 3): return False - if utils.find_in_next_n_tokens("while", 3, iToken, lObjects): + if oDataStructure.does_string_exist_in_next_n_tokens("while", 3): return True - if utils.find_in_next_n_tokens("for", 3, iToken, lObjects): + if oDataStructure.does_string_exist_in_next_n_tokens("for", 3): return True return False diff --git a/vsg/vhdlFile/classify/loop_statement.py b/vsg/vhdlFile/classify/loop_statement.py index bb9e52974..3468e4c97 100644 --- a/vsg/vhdlFile/classify/loop_statement.py +++ b/vsg/vhdlFile/classify/loop_statement.py @@ -5,7 +5,7 @@ from vsg.vhdlFile.classify import iteration_scheme, sequence_of_statements -def detect(iToken, lObjects): +def detect(oDataStructure): """ loop_statement ::= [ loop_label : ] @@ -13,20 +13,19 @@ def detect(iToken, lObjects): sequence_of_statements end loop [ loop_label ] ; """ - if utils.find_in_next_n_tokens(":", 2, iToken, lObjects): - iCurrent = utils.find_next_token(iToken, lObjects) - iCurrent += 1 - iCurrent = utils.find_next_token(iCurrent, lObjects) - iCurrent += 1 - else: - iCurrent = iToken - - if iteration_scheme.detect(iCurrent, lObjects): - return classify(iToken, lObjects) - if utils.is_next_token("loop", iCurrent, lObjects): - return classify(iToken, lObjects) - - return iToken + oDataStructure.align_seek_index() + if oDataStructure.does_string_exist_in_next_n_tokens(":", 2): + oDataStructure.increment_seek_index() + oDataStructure.advance_to_next_seek_token() + oDataStructure.increment_seek_index() + + if oDataStructure.is_next_seek_token("loop"): + classify(oDataStructure) + return True + if iteration_scheme.detect(oDataStructure): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/name.py b/vsg/vhdlFile/classify/name.py index 0eb176cb7..f7e823e58 100644 --- a/vsg/vhdlFile/classify/name.py +++ b/vsg/vhdlFile/classify/name.py @@ -2,11 +2,10 @@ from vsg import parser from vsg.token import direction -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import external_name +from vsg.vhdlFile.classify import external_name, utils -def classify_until(lUntils, iToken, lObjects, oType=parser.todo): +def classify_until(lUntils, oDataStructure, oType=parser.todo): """ name ::= simple_name @@ -21,24 +20,17 @@ def classify_until(lUntils, iToken, lObjects, oType=parser.todo): NOTE: At the moment, everything will be set to parser.todo. """ - iReturn = external_name.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn - - iCurrent = iToken - iStop = len(lObjects) - 1 - iOpenParenthesis = 0 - iCloseParenthesis = 0 - while iCurrent < iStop: - iCurrent = utils.find_next_token(iCurrent, lObjects) - if utils.token_is_open_parenthesis(iCurrent, lObjects): - iOpenParenthesis += 1 - if utils.token_is_close_parenthesis(iCurrent, lObjects): - iCloseParenthesis += 1 - if iOpenParenthesis < iCloseParenthesis: + if external_name.detect(oDataStructure): + return None + + iParen = 0 + while oDataStructure.advance_to_next_token(): + iParen = utils.update_paren_counter(iParen, oDataStructure) + + if utils.unmatched_close_paren_found(iParen): break - elif lObjects[iCurrent].get_lower_value() in lUntils: + + if oDataStructure.get_current_token_lower_value() in lUntils: break else: - utils.assign_special_tokens(lObjects, iCurrent, oType) - return iCurrent + utils.assign_special_tokens(oDataStructure, oType) diff --git a/vsg/vhdlFile/classify/next_statement.py b/vsg/vhdlFile/classify/next_statement.py index 0ea7b3424..15162cb67 100644 --- a/vsg/vhdlFile/classify/next_statement.py +++ b/vsg/vhdlFile/classify/next_statement.py @@ -1,20 +1,18 @@ # -*- coding: utf-8 -*- from vsg.token import next_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import condition +from vsg.vhdlFile.classify import condition, utils -def detect(iToken, lObjects): +def detect(oDataStructure): """ next_statement ::= [ label : ] next [ loop_label ] [ when condition ] ; """ - if utils.are_next_consecutive_tokens([None, ":", "next"], iToken, lObjects): - return classify(iToken, lObjects) - if utils.is_next_token("next", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if utils.keyword_found("next", oDataStructure): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/null_statement.py b/vsg/vhdlFile/classify/null_statement.py index 4d281225c..810dfb822 100644 --- a/vsg/vhdlFile/classify/null_statement.py +++ b/vsg/vhdlFile/classify/null_statement.py @@ -1,19 +1,18 @@ # -*- coding: utf-8 -*- from vsg.token import null_statement as token -from vsg.vhdlFile import utils +from vsg.vhdlFile.classify import utils -def detect(iToken, lObjects): +def detect(oDataStructure): """ null_statement ::= [ label : ] null ; """ - if utils.are_next_consecutive_tokens([None, ":", "null"], iToken, lObjects): - return classify(iToken, lObjects) - if utils.is_next_token("null", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if utils.keyword_found("null", oDataStructure): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/procedure_call_statement.py b/vsg/vhdlFile/classify/procedure_call_statement.py index 531e1376c..979a12cc4 100644 --- a/vsg/vhdlFile/classify/procedure_call_statement.py +++ b/vsg/vhdlFile/classify/procedure_call_statement.py @@ -7,31 +7,37 @@ lKeywords = ["null", "return", "exit", "next", "while", "for", "loop", "case", "if", "report", "assert", "wait", "end", "with", "else", "elsif", "when"] -def detect(iToken, lObjects): +def detect(oDataStructure): """ procedure_call_statement ::= [ label : ] procedure_call ; """ - iCurrent = iToken - # Move past label if it exists - if utils.find_in_next_n_tokens(":", 2, iCurrent, lObjects): - iCurrent = utils.find_next_token(iCurrent, lObjects) - iCurrent += 1 - iCurrent = utils.find_next_token(iCurrent, lObjects) - iCurrent += 1 - # Check if next token is keyword - iCurrent = utils.find_next_token(iCurrent, lObjects) - if lObjects[iCurrent].get_lower_value() in lKeywords: - return iToken - # Check if signal assignment operator exists - if not utils.all_assignments_inside_parenthesis(iToken, ";", lObjects): - return iToken - # Check if variable assignment operator exists - if utils.find_in_range(":=", iCurrent, ";", lObjects): - return iToken - # Otherwise it must be a procedure_call_statement - return classify(iToken, lObjects) + if procedure_call.detect(oDataStructure): + classify(oDataStructure) + return True + return False + + +# iCurrent = iToken +# # Move past label if it exists +# if utils.find_in_next_n_tokens(":", 2, iCurrent, lObjects): +# iCurrent = utils.find_next_token(iCurrent, lObjects) +# iCurrent += 1 +# iCurrent = utils.find_next_token(iCurrent, lObjects) +# iCurrent += 1 +# # Check if next token is keyword +# iCurrent = utils.find_next_token(iCurrent, lObjects) +# if lObjects[iCurrent].get_lower_value() in lKeywords: +# return iToken +# # Check if signal assignment operator exists +# if not utils.all_assignments_inside_parenthesis(iToken, ";", lObjects): +# return iToken +# # Check if variable assignment operator exists +# if utils.find_in_range(":=", iCurrent, ";", lObjects): +# return iToken +# # Otherwise it must be a procedure_call_statement +# return classify(iToken, lObjects) def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/process_declarative_item.py b/vsg/vhdlFile/classify/process_declarative_item.py index 5fae49206..f9e2d3b65 100644 --- a/vsg/vhdlFile/classify/process_declarative_item.py +++ b/vsg/vhdlFile/classify/process_declarative_item.py @@ -19,7 +19,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ process_declarative_item ::= subprogram_declaration @@ -41,61 +41,44 @@ def detect(iToken, lObjects): | group_declaration """ - iReturn = subprogram_declaration.detect(iToken, lObjects) - if iReturn != iToken: - iReturn = subprogram_body.detect(iReturn, lObjects) - return iReturn + if subprogram_declaration.detect(oDataStructure): + subprogram_body.detect(oDataStructure) + return True - iReturn = subprogram_instantiation_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if subprogram_instantiation_declaration.detect(oDataStructure): + return True - iReturn = package_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_declaration.detect(oDataStructure): + return True - iReturn = package_body.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_body.detect(oDataStructure): + return True - iReturn = package_instantiation_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_instantiation_declaration.detect(oDataStructure): + return True - iReturn = type_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if type_declaration.detect(oDataStructure): + return True - iReturn = subtype_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if subtype_declaration.detect(oDataStructure): + return True - iReturn = constant_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if constant_declaration.detect(oDataStructure): + return True - iReturn = variable_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if variable_declaration.detect(oDataStructure): + return True - iReturn = file_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if file_declaration.detect(oDataStructure): + return True - iReturn = alias_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if alias_declaration.detect(oDataStructure): + return True - iReturn = attribute_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if attribute_declaration.detect(oDataStructure): + return True - iReturn = attribute_specification.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if attribute_specification.detect(oDataStructure): + return True - iReturn = use_clause.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn - - return iToken + return use_clause.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/process_declarative_part.py b/vsg/vhdlFile/classify/process_declarative_part.py index 46d14e945..6a923e030 100644 --- a/vsg/vhdlFile/classify/process_declarative_part.py +++ b/vsg/vhdlFile/classify/process_declarative_part.py @@ -4,15 +4,11 @@ from vsg.vhdlFile.classify import process_declarative_item -def detect(iToken, lObjects): +def detect(oDataStructure): """ process_declarative_part ::= { process_declarative_item } """ - iLast = 0 - iCurrent = iToken - while iLast != iCurrent: - iLast = iCurrent - iCurrent = process_declarative_item.detect(iCurrent, lObjects) - return iCurrent + while process_declarative_item.detect(oDataStructure): + pass diff --git a/vsg/vhdlFile/classify/process_sensitivity_list.py b/vsg/vhdlFile/classify/process_sensitivity_list.py index 9a085e0ce..a5dcfbd76 100644 --- a/vsg/vhdlFile/classify/process_sensitivity_list.py +++ b/vsg/vhdlFile/classify/process_sensitivity_list.py @@ -1,17 +1,16 @@ # -*- coding: utf-8 -*- from vsg.token import process_sensitivity_list as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import sensitivity_list -def classify(iToken, lObjects): +def classify(oDataStructure): """ process_sensitivity_list ::= all | sensitivity_list """ - if utils.is_next_token("all", iToken, lObjects): - return utils.assign_next_token_required("all", token.all_keyword, iToken, lObjects) + if oDataStructure.is_next_token("all"): + oDataStructure.replace_next_token_with(token.all_keyword) else: - return sensitivity_list.classify(iToken, lObjects) + sensitivity_list.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/process_statement.py b/vsg/vhdlFile/classify/process_statement.py index 2386f6a25..11cbdf384 100644 --- a/vsg/vhdlFile/classify/process_statement.py +++ b/vsg/vhdlFile/classify/process_statement.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- from vsg.token import process_statement as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( process_declarative_part, process_sensitivity_list, process_statement_part, + utils, ) @@ -26,40 +26,34 @@ def detect(oDataStructure): return False -def classify(iToken, lObjects): - iCurrent = classify_opening_declaration(iToken, lObjects) +def classify(oDataStructure): + classify_opening_declaration(oDataStructure) - iCurrent = process_declarative_part.detect(iCurrent, lObjects) + process_declarative_part.detect(oDataStructure) - iCurrent = utils.assign_next_token_required("begin", token.begin_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("begin", token.begin_keyword) - iCurrent = process_statement_part.detect(iCurrent, lObjects) + process_statement_part.detect(oDataStructure) - iCurrent = classify_closing_declaration(iCurrent, lObjects) + classify_closing_declaration(oDataStructure) - return iCurrent +def classify_opening_declaration(oDataStructure): + utils.tokenize_label(oDataStructure, token.process_label, token.label_colon) + oDataStructure.replace_next_token_with_if("postponed", token.postponed_keyword) + oDataStructure.replace_next_token_required("process", token.process_keyword) -def classify_opening_declaration(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.process_label, token.label_colon) - iCurrent = utils.assign_next_token_if("postponed", token.postponed_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("process", token.process_keyword, iCurrent, lObjects) + if oDataStructure.is_next_token("("): + oDataStructure.replace_next_token_with(token.open_parenthesis) + process_sensitivity_list.classify(oDataStructure) + oDataStructure.replace_next_token_required(")", token.close_parenthesis) - if utils.is_next_token("(", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) - iCurrent = process_sensitivity_list.classify(iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) + oDataStructure.replace_next_token_with_if("is", token.is_keyword) - iCurrent = utils.assign_next_token_if("is", token.is_keyword, iCurrent, lObjects) - return iCurrent - - -def classify_closing_declaration(iToken, lObjects): - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("postponed", token.end_postponed_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("process", token.end_process_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.end_process_label, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent +def classify_closing_declaration(oDataStructure): + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_with_if("postponed", token.end_postponed_keyword) + oDataStructure.replace_next_token_required("process", token.end_process_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.end_process_label) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/process_statement_part.py b/vsg/vhdlFile/classify/process_statement_part.py index 56139888d..be2edec69 100644 --- a/vsg/vhdlFile/classify/process_statement_part.py +++ b/vsg/vhdlFile/classify/process_statement_part.py @@ -3,15 +3,11 @@ from vsg.vhdlFile.classify import sequential_statement -def detect(iToken, lObjects): +def detect(oDataStructure): """ process_statement_part ::= { sequential_statement } """ - iLast = 0 - iCurrent = iToken - while iLast != iCurrent: - iLast = iCurrent - iCurrent = sequential_statement.detect(iCurrent, lObjects) - return iCurrent + while sequential_statement.detect(oDataStructure): + pass diff --git a/vsg/vhdlFile/classify/report_statement.py b/vsg/vhdlFile/classify/report_statement.py index 3d657434c..2c0fecf56 100644 --- a/vsg/vhdlFile/classify/report_statement.py +++ b/vsg/vhdlFile/classify/report_statement.py @@ -1,11 +1,10 @@ # -*- coding: utf-8 -*- from vsg.token import report_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import expression +from vsg.vhdlFile.classify import expression, utils -def detect(iToken, lObjects): +def detect(oDataStructure): """ report_statement ::= [ label : ] @@ -13,9 +12,10 @@ def detect(iToken, lObjects): [ severity expression ] ; """ - if utils.keyword_found("report", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if utils.keyword_found("report", oDataStructure): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/return_statement.py b/vsg/vhdlFile/classify/return_statement.py index 7782025c2..4ec9e0c83 100644 --- a/vsg/vhdlFile/classify/return_statement.py +++ b/vsg/vhdlFile/classify/return_statement.py @@ -1,22 +1,19 @@ # -*- coding: utf-8 -*- from vsg.token import return_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import expression +from vsg.vhdlFile.classify import expression, utils -def detect(iToken, lObjects): +def detect(oDataStructure): """ return_statement ::= [ label : ] return [ expression ] ; """ - if utils.find_in_next_n_tokens(":", 2, iToken, lObjects): - if utils.find_in_next_n_tokens("return", 3, iToken, lObjects): - return classify(iToken, lObjects) - if utils.is_next_token("return", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if utils.keyword_found("return", oDataStructure): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/selected_signal_assignment.py b/vsg/vhdlFile/classify/selected_signal_assignment.py index 0951ed671..e146a7c6e 100644 --- a/vsg/vhdlFile/classify/selected_signal_assignment.py +++ b/vsg/vhdlFile/classify/selected_signal_assignment.py @@ -7,17 +7,17 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ selected_signal_assignment ::= selected_waveform_assignment | selected_force_assignment """ - if utils.find_in_range("<=", iToken, ";", lObjects): - if utils.find_in_next_n_tokens("with", 3, iToken, lObjects): + if oDataStructure.does_string_exist_before_string("<=", ";"): + if oDataStructure.doess_string_exist_in_next_n_tokens("with", 3): return True - if utils.find_in_next_n_tokens("if", 3, iToken, lObjects): + if oDataStructure.doess_string_exist_in_next_n_tokens("if", 3): return True return False diff --git a/vsg/vhdlFile/classify/selected_variable_assignment.py b/vsg/vhdlFile/classify/selected_variable_assignment.py index 4784d8c46..3839cf3f0 100644 --- a/vsg/vhdlFile/classify/selected_variable_assignment.py +++ b/vsg/vhdlFile/classify/selected_variable_assignment.py @@ -5,19 +5,18 @@ from vsg.vhdlFile.classify import expression, selected_expressions -def detect(iToken, lObjects): +def detect(oDataStructure): """ selected_variable_assignment ::= with expression select [ ? ] target := selected_expressions ; """ - if utils.is_next_token_one_of(["when", "if", "elsif", "else"], iToken, lObjects): + if oDataStructure.is_next_token_one_of(["when", "if", "elsif", "else"]): return False - if utils.find_in_range(":=", iToken, ";", lObjects): - if utils.find_in_range("with", iToken, ";", lObjects): + if oDataStructure.does_string_exist_before_string(":=", ";"): + if oDataStructure.does_string_exist_before_string("with", ";"): return True - return False return False diff --git a/vsg/vhdlFile/classify/sensitivity_list.py b/vsg/vhdlFile/classify/sensitivity_list.py index 36e57f61b..6648c28ae 100644 --- a/vsg/vhdlFile/classify/sensitivity_list.py +++ b/vsg/vhdlFile/classify/sensitivity_list.py @@ -3,34 +3,26 @@ from vsg import parser from vsg.token import sensitivity_list as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import name +from vsg.vhdlFile.classify import name, utils -def classify(iToken, lObjects): +def classify(oDataStructure): """ sensitivity_list ::= *signal*_name { , *signal*_name} """ - iCurrent = iToken - iStop = len(lObjects) - 1 - iOpenParenthesis = 0 - iCloseParenthesis = 0 - while iCurrent < iStop: - iCurrent = utils.find_next_token(iCurrent, lObjects) - if utils.token_is_open_parenthesis(iCurrent, lObjects): - iOpenParenthesis += 1 - if utils.token_is_close_parenthesis(iCurrent, lObjects): - iCloseParenthesis += 1 - if iOpenParenthesis < iCloseParenthesis: + iParen = 0 + while oDataStructure.advance_to_next_token(): + iParen = utils.update_paren_counter(iParen, oDataStructure) + + if utils.unmatched_close_paren_found(iParen): break + + if oDataStructure.is_next_token(","): + oDataStructure.replace_next_token_with(token.comma) else: - if utils.is_next_token(",", iCurrent, lObjects): - utils.assign_token(lObjects, iCurrent, token.comma) - else: - iCurrent = name.classify_until([","], iCurrent, lObjects) - return iCurrent + name.classify_until([","], oDataStructure) def classify_until(lUntils, iToken, lObjects): diff --git a/vsg/vhdlFile/classify/sequential_statement.py b/vsg/vhdlFile/classify/sequential_statement.py index 8c5ffd946..8638c4efa 100644 --- a/vsg/vhdlFile/classify/sequential_statement.py +++ b/vsg/vhdlFile/classify/sequential_statement.py @@ -19,7 +19,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ sequential_statement ::= wait_statement @@ -37,55 +37,40 @@ def detect(iToken, lObjects): | null_statement """ - iReturn = wait_statement.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if wait_statement.detect(oDataStructure): + return True - iReturn = assertion_statement.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if assertion_statement.detect(oDataStructure): + return True - iReturn = report_statement.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if report_statement.detect(oDataStructure): + return True - iReturn = case_statement.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if case_statement.detect(oDataStructure): + return True - iReturn = if_statement.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if if_statement.detect(oDataStructure): + return True - iReturn = loop_statement.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if loop_statement.detect(oDataStructure): + return True - iReturn = variable_assignment_statement.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if variable_assignment_statement.detect(oDataStructure): + return True - iReturn = exit_statement.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if exit_statement.detect(oDataStructure): + return True - iReturn = signal_assignment_statement.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if signal_assignment_statement.detect(oDataStructure): + return True - iReturn = procedure_call_statement.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if next_statement.detect(oDataStructure): + return True - iReturn = next_statement.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if return_statement.detect(oDataStructure): + return True - iReturn = return_statement.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if null_statement.detect(oDataStructure): + return True - iReturn = null_statement.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn - return iToken + return procedure_call_statement.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/signal_assignment_statement.py b/vsg/vhdlFile/classify/signal_assignment_statement.py index 16268d9b2..9251f2625 100644 --- a/vsg/vhdlFile/classify/signal_assignment_statement.py +++ b/vsg/vhdlFile/classify/signal_assignment_statement.py @@ -1,15 +1,15 @@ # -*- coding: utf-8 -*- from vsg.token import signal_assignment_statement as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( conditional_signal_assignment, selected_signal_assignment, simple_signal_assignment, + utils, ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ signal_assignment_statement ::= [ label : ] simple_signal_assignment @@ -17,18 +17,19 @@ def detect(iToken, lObjects): | [ label : ] selected_signal_assignment """ - iCurrent = iToken + if selected_signal_assignment.detect(oDataStructure): + utils.tokenize_label(oDataStructure, token.label, token.label_colon) + selected_signal_assignment.classify(oDataStructure) + return True - if selected_signal_assignment.detect(iToken, lObjects): - iCurrent = utils.tokenize_label(iCurrent, lObjects, token.label, token.label_colon) - iCurrent = selected_signal_assignment.classify(iCurrent, lObjects) + if conditional_signal_assignment.detect(oDataStructure): + utils.tokenize_label(oDataStructure, token.label, token.label_colon) + conditional_signal_assignment.classify(oDataStructure) + return True - elif conditional_signal_assignment.detect(iToken, lObjects): - iCurrent = utils.tokenize_label(iCurrent, lObjects, token.label, token.label_colon) - iCurrent = conditional_signal_assignment.classify(iCurrent, lObjects) + if simple_signal_assignment.detect(oDataStructure): + utils.tokenize_label(oDataStructure, token.label, token.label_colon) + simple_signal_assignment.classify(oDataStructure) + return True - elif simple_signal_assignment.detect(iToken, lObjects): - iCurrent = utils.tokenize_label(iCurrent, lObjects, token.label, token.label_colon) - iCurrent = simple_signal_assignment.classify(iCurrent, lObjects) - - return iCurrent + return False diff --git a/vsg/vhdlFile/classify/simple_signal_assignment.py b/vsg/vhdlFile/classify/simple_signal_assignment.py index 2544b6067..324c04964 100644 --- a/vsg/vhdlFile/classify/simple_signal_assignment.py +++ b/vsg/vhdlFile/classify/simple_signal_assignment.py @@ -8,7 +8,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ simple_signal_assignment ::= simple_waveform_assignment @@ -16,17 +16,28 @@ def detect(iToken, lObjects): | simple_release_assignment """ - if utils.find_in_next_n_tokens("if", 3, iToken, lObjects): + if oDataStructure.does_string_exist_in_next_n_tokens("if", 3): return False - if utils.find_in_range("<=", iToken, ";", lObjects): - if utils.find_in_range("when", iToken, ";", lObjects): + if oDataStructure.does_string_exist_before_string("<=", ";"): + if oDataStructure.does_string_exist_before_string("with", ";"): return False - if utils.find_in_range("with", iToken, ";", lObjects): + if oDataStructure.does_string_exist_before_string("when", ";"): return False return True return False +# if utils.find_in_next_n_tokens("if", 3, iToken, lObjects): +# return False +# if utils.find_in_range("<=", iToken, ";", lObjects): +# if utils.find_in_range("when", iToken, ";", lObjects): +# return False +# if utils.find_in_range("with", iToken, ";", lObjects): +# return False +# return True +# return False + + def classify(iToken, lObjects): iCurrent = iToken iCurrent = simple_force_assignment.detect(iToken, lObjects) diff --git a/vsg/vhdlFile/classify/simple_variable_assignment.py b/vsg/vhdlFile/classify/simple_variable_assignment.py index c9e961d2b..1b10b2384 100644 --- a/vsg/vhdlFile/classify/simple_variable_assignment.py +++ b/vsg/vhdlFile/classify/simple_variable_assignment.py @@ -5,23 +5,34 @@ from vsg.vhdlFile.classify import expression, target -def detect(iToken, lObjects): +def detect(oDataStructure): """ simple_variable_assignment ::= target := expression ; """ - if utils.is_next_token_one_of(["when", "if", "elsif", "else"], iToken, lObjects): + if oDataStructure.is_next_token_one_of(["when", "if", "elsif", "else"]): return False - if utils.find_in_range(":=", iToken, ";", lObjects): - if utils.find_in_range("with", iToken, ";", lObjects): + if oDataStructure.does_string_exist_before_string(":=", ";"): + if oDataStructure.does_string_exist_before_string("with", ";"): return False - if utils.find_in_range("when", iToken, ";", lObjects): + if oDataStructure.does_string_exist_before_string("when", ";"): return False return True return False +# if utils.is_next_token_one_of(["when", "if", "elsif", "else"], iToken, lObjects): +# return False +# if utils.find_in_range(":=", iToken, ";", lObjects): +# if utils.find_in_range("with", iToken, ";", lObjects): +# return False +# if utils.find_in_range("when", iToken, ";", lObjects): +# return False +# return True +# return False + + def classify(iToken, lObjects): iCurrent = target.classify(iToken, lObjects, token) iCurrent = utils.assign_next_token_required(":=", token.assignment, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 13a6fa1f0..bd51edf68 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -121,7 +121,8 @@ def assign_special_tokens(oDataStructure, oType): elif sValue == "=>": oDataStructure.replace_current_token_with(element_association.assignment) elif sValue == "e": - if lObjects[iCurrent + 1].get_value().isdigit() or lObjects[iCurrent + 1].get_value() == "-" or lObjects[iCurrent + 1].get_value() == "+": + sNextValue = oDataStructure.lAllObjects[oDataStructure.get_current_index() + 1].get_lower_value() + if sNextValue.isdigit() or sNextValue == "-" or sNextValue == "+": oDataStructure.replace_current_token_with(exponent.e_keyword) else: oDataStructure.replace_current_token_with(oType) @@ -186,3 +187,20 @@ def update_paren_counter(iParen, oDataStructure): if is_current_token_close_paren(oDataStructure): return iParen - 1 return iParen + + +def tokenize_label(oDataStructure, label_token, colon_token): + oDataStructure.advance_to_next_token() + iItemCount = 0 + if oDataStructure.are_next_consecutive_tokens([None, ":"]): + oDataStructure.replace_current_token_with(label_token) + oDataStructure.advance_to_next_token() + oDataStructure.replace_current_token_with(colon_token) + + +def keyword_found(sKeyword, oDataStructure): + if oDataStructure.is_next_token("wait"): + return True + if oDataStructure.are_next_consecutive_tokens([None, ":", "wait"]): + return True + return False diff --git a/vsg/vhdlFile/classify/variable_assignment_statement.py b/vsg/vhdlFile/classify/variable_assignment_statement.py index 1b4d58a5e..eb6710dc5 100644 --- a/vsg/vhdlFile/classify/variable_assignment_statement.py +++ b/vsg/vhdlFile/classify/variable_assignment_statement.py @@ -1,32 +1,34 @@ # -*- coding: utf-8 -*- from vsg.token import variable_assignment_statement as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( conditional_variable_assignment, selected_variable_assignment, simple_variable_assignment, + utils, ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ variable_assignment_statement ::= [ label : ] simple_variable_assignment | [ label : ] conditional_variable_assignment | [ label : ] selected_variable_assignment """ - iCurrent = iToken - if selected_variable_assignment.detect(iToken, lObjects): - iCurrent = utils.tokenize_label(iCurrent, lObjects, token.label, token.label_colon) - iCurrent = selected_variable_assignment.classify(iCurrent, lObjects) + if selected_variable_assignment.detect(oDataStructure): + utils.tokenize_label(oDataStructure, token.label, token.label_colon) + selected_variable_assignment.classify(oDataStructure) + return True - elif conditional_variable_assignment.detect(iToken, lObjects): - iCurrent = utils.tokenize_label(iCurrent, lObjects, token.label, token.label_colon) - iCurrent = conditional_variable_assignment.classify(iCurrent, lObjects) + if conditional_variable_assignment.detect(oDataStructure): + utils.tokenize_label(oDataStructure, token.label, token.label_colon) + conditional_variable_assignment.classify(oDataStructure) + return True - elif simple_variable_assignment.detect(iToken, lObjects): - iCurrent = utils.tokenize_label(iCurrent, lObjects, token.label, token.label_colon) - iCurrent = simple_variable_assignment.classify(iCurrent, lObjects) + if simple_variable_assignment.detect(oDataStructure): + utils.tokenize_label(oDataStructure, token.label, token.label_colon) + simple_variable_assignment.classify(oDataStructure) + return True - return iCurrent + return False diff --git a/vsg/vhdlFile/classify/wait_statement.py b/vsg/vhdlFile/classify/wait_statement.py index 7246a681c..7ac2641f5 100644 --- a/vsg/vhdlFile/classify/wait_statement.py +++ b/vsg/vhdlFile/classify/wait_statement.py @@ -1,18 +1,23 @@ # -*- coding: utf-8 -*- from vsg.token import wait_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import condition_clause, sensitivity_clause, timeout_clause +from vsg.vhdlFile.classify import ( + condition_clause, + sensitivity_clause, + timeout_clause, + utils, +) -def detect(iToken, lObjects): +def detect(oDataStructure): """ wait_statement ::= [ label : ] wait [ sensitivity_clause ] [ condition_clause ] [ timeout_clause ] ; """ - if utils.keyword_found("wait", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if utils.keyword_found("wait", oDataStructure): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): From 6e178f5f0a00899a998bc898b6e3f7150c622242 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 9 Feb 2025 08:38:02 -0600 Subject: [PATCH 030/124] Parsing wait_statement. --- vsg/token/wait_statement.py | 4 ++-- vsg/vhdlFile/classify/condition.py | 4 ++-- vsg/vhdlFile/classify/condition_clause.py | 13 +++++------- vsg/vhdlFile/classify/sensitivity_clause.py | 12 +++++------ vsg/vhdlFile/classify/sensitivity_list.py | 13 ++++-------- vsg/vhdlFile/classify/timeout_clause.py | 13 +++++------- vsg/vhdlFile/classify/wait_statement.py | 22 ++++++++++----------- 7 files changed, 33 insertions(+), 48 deletions(-) diff --git a/vsg/token/wait_statement.py b/vsg/token/wait_statement.py index 9be77606f..f6303fd09 100644 --- a/vsg/token/wait_statement.py +++ b/vsg/token/wait_statement.py @@ -17,8 +17,8 @@ class label_colon(parser.label_colon): unique_id = wait_statement : label_colon """ - def __init__(self): - super().__init__() + def __init__(self, sString=":"): + super().__init__(sString) class wait_keyword(parser.keyword): diff --git a/vsg/vhdlFile/classify/condition.py b/vsg/vhdlFile/classify/condition.py index 96373c637..4a115a12e 100644 --- a/vsg/vhdlFile/classify/condition.py +++ b/vsg/vhdlFile/classify/condition.py @@ -3,9 +3,9 @@ from vsg.vhdlFile.classify import expression -def classify_until(lUntils, iToken, lObjects): +def classify_until(lUntils, oDataStructure): """ condition ::= expression """ - return expression.classify_until(lUntils, iToken, lObjects) + expression.classify_until(lUntils, oDataStructure) diff --git a/vsg/vhdlFile/classify/condition_clause.py b/vsg/vhdlFile/classify/condition_clause.py index 9017497dc..7e3411754 100644 --- a/vsg/vhdlFile/classify/condition_clause.py +++ b/vsg/vhdlFile/classify/condition_clause.py @@ -1,24 +1,21 @@ # -*- coding: utf-8 -*- from vsg.token import condition_clause as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import condition -def detect(iToken, lObjects): +def detect(oDataStructure): """ condition_clause ::= until condition """ - if utils.is_next_token("until", iToken, lObjects): + if oDataStructure.is_next_token("until"): return True return False -def classify_until(lUntils, iToken, lObjects): - iCurrent = utils.assign_next_token_required("until", token.until_keyword, iToken, lObjects) +def classify_until(lUntils, oDataStructure): + oDataStructure.replace_next_token_with(token.until_keyword) - iCurrent = condition.classify_until(lUntils, iCurrent, lObjects) - - return iCurrent + condition.classify_until(lUntils, oDataStructure) diff --git a/vsg/vhdlFile/classify/sensitivity_clause.py b/vsg/vhdlFile/classify/sensitivity_clause.py index 470808309..c51bffe6e 100644 --- a/vsg/vhdlFile/classify/sensitivity_clause.py +++ b/vsg/vhdlFile/classify/sensitivity_clause.py @@ -5,20 +5,18 @@ from vsg.vhdlFile.classify import sensitivity_list -def detect(iToken, lObjects): +def detect(oDataStructure): """ sensitivity_clause ::= on sensitivity_list """ - if utils.is_next_token("on", iToken, lObjects): + if oDataStructure.is_next_token("on"): return True return False -def classify_until(lUntils, iToken, lObjects): - iCurrent = utils.assign_next_token_required("on", token.on_keyword, iToken, lObjects) +def classify_until(lUntils, oDataStructure): + oDataStructure.replace_next_token_required("on", token.on_keyword) - iCurrent = sensitivity_list.classify_until(lUntils, iCurrent, lObjects) - - return iCurrent + sensitivity_list.classify_until(lUntils, oDataStructure) diff --git a/vsg/vhdlFile/classify/sensitivity_list.py b/vsg/vhdlFile/classify/sensitivity_list.py index 6648c28ae..0fe9da77d 100644 --- a/vsg/vhdlFile/classify/sensitivity_list.py +++ b/vsg/vhdlFile/classify/sensitivity_list.py @@ -25,18 +25,13 @@ def classify(oDataStructure): name.classify_until([","], oDataStructure) -def classify_until(lUntils, iToken, lObjects): +def classify_until(lUntils, oDataStructure): """ sensitivity_list ::= *signal*_name { , *signal*_name} """ - iCurrent = iToken - iLast = 0 lMyUntils = copy.deepcopy(lUntils) lMyUntils.append(",") - while iLast != iCurrent: - iLast = iCurrent - if lObjects[utils.find_next_token(iCurrent, lObjects)].get_lower_value() in lUntils: - return iCurrent - iCurrent = utils.assign_next_token_if(",", token.comma, iCurrent, lObjects) - iCurrent = name.classify_until(lMyUntils, iCurrent, lObjects) + while not oDataStructure.is_next_token_one_of(lUntils): + oDataStructure.replace_next_token_with_if(",", token.comma) + name.classify_until(lMyUntils, oDataStructure) diff --git a/vsg/vhdlFile/classify/timeout_clause.py b/vsg/vhdlFile/classify/timeout_clause.py index 2a9d8ccd9..d918d981c 100644 --- a/vsg/vhdlFile/classify/timeout_clause.py +++ b/vsg/vhdlFile/classify/timeout_clause.py @@ -1,24 +1,21 @@ # -*- coding: utf-8 -*- from vsg.token import timeout_clause as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression -def detect(iToken, lObjects): +def detect(oDataStructure): """ timeout_clause ::= for *time*_expression """ - if utils.is_next_token("for", iToken, lObjects): + if oDataStructure.is_next_token("for"): return True return False -def classify_until(lUntils, iToken, lObjects): - iCurrent = utils.assign_next_token_required("for", token.for_keyword, iToken, lObjects) +def classify_until(lUntils, oDataStructure): + oDataStructure.replace_next_token_with(token.for_keyword) - iCurrent = expression.classify_until(lUntils, iCurrent, lObjects) - - return iCurrent + expression.classify_until(lUntils, oDataStructure) diff --git a/vsg/vhdlFile/classify/wait_statement.py b/vsg/vhdlFile/classify/wait_statement.py index 7ac2641f5..3a520d6e0 100644 --- a/vsg/vhdlFile/classify/wait_statement.py +++ b/vsg/vhdlFile/classify/wait_statement.py @@ -20,19 +20,17 @@ def detect(oDataStructure): return False -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.label, token.label_colon) - iCurrent = utils.assign_next_token_required("wait", token.wait_keyword, iCurrent, lObjects) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.label, token.label_colon) + oDataStructure.replace_next_token_with(token.wait_keyword) - if sensitivity_clause.detect(iCurrent, lObjects): - iCurrent = sensitivity_clause.classify_until([";", "for", "until"], iCurrent, lObjects) + if sensitivity_clause.detect(oDataStructure): + sensitivity_clause.classify_until([";", "for", "until"], oDataStructure) - if condition_clause.detect(iCurrent, lObjects): - iCurrent = condition_clause.classify_until([";", "for"], iCurrent, lObjects) + if condition_clause.detect(oDataStructure): + condition_clause.classify_until([";", "for"], oDataStructure) - if timeout_clause.detect(iCurrent, lObjects): - iCurrent = timeout_clause.classify_until([";"], iCurrent, lObjects) + if timeout_clause.detect(oDataStructure): + timeout_clause.classify_until([";"], oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) From 26e7b74d02bde891331a2c35fd60c7083c9c75db Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 9 Feb 2025 09:10:32 -0600 Subject: [PATCH 031/124] Parsing unbounded_array_definition. --- .../classify/access_type_definition.py | 10 +++--- vsg/vhdlFile/classify/aggregate.py | 18 ++++------ .../classify/array_type_definition.py | 13 +++---- .../classify/composite_type_definition.py | 14 +++----- .../classify/enumeration_type_definition.py | 10 +++--- .../classify/full_type_declaration.py | 15 ++++---- .../classify/index_subtype_definition.py | 10 +++--- .../classify/integer_type_definition.py | 4 +-- .../classify/physical_type_definition.py | 13 +++---- .../classify/scalar_type_definition.py | 19 ++++------ .../classify/simple_variable_assignment.py | 24 +++---------- vsg/vhdlFile/classify/target.py | 11 +++--- vsg/vhdlFile/classify/type_definition.py | 28 ++++++--------- .../classify/unbounded_array_definition.py | 36 +++++++++---------- vsg/vhdlFile/classify/utils.py | 5 +++ 15 files changed, 91 insertions(+), 139 deletions(-) diff --git a/vsg/vhdlFile/classify/access_type_definition.py b/vsg/vhdlFile/classify/access_type_definition.py index 682e04e95..cf63758a5 100644 --- a/vsg/vhdlFile/classify/access_type_definition.py +++ b/vsg/vhdlFile/classify/access_type_definition.py @@ -5,16 +5,16 @@ from vsg.vhdlFile.classify import subtype_indication -def detect(iToken, lObjects): +def detect(oDataStructure): """ access_type_definition ::= access subtype_indication """ - if utils.is_next_token("access", iToken, lObjects): - return classify(iToken, lObjects) - - return iToken + if oDataStructure.is_next_token("access"): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/aggregate.py b/vsg/vhdlFile/classify/aggregate.py index fe02c6bdc..639a98e10 100644 --- a/vsg/vhdlFile/classify/aggregate.py +++ b/vsg/vhdlFile/classify/aggregate.py @@ -1,20 +1,16 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile import utils - -def classify(iToken, lObjects, oTokenClass): +def classify(oDataStructure, oTokenClass): """ aggregate ::= ( element_association { , element_association } ) """ - iCurrent = utils.assign_next_token_required("(", oTokenClass.aggregate_open_parenthesis, iToken, lObjects) - iCurrent = utils.assign_next_token(oTokenClass.simple_name, iCurrent, lObjects) - - while utils.is_next_token(",", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(",", oTokenClass.aggregate_comma, iCurrent, lObjects) - iCurrent = utils.assign_next_token(oTokenClass.simple_name, iCurrent, lObjects) + oDataStructure.replace_next_token_required("(", oTokenClass.aggregate_open_parenthesis) + oDataStructure.replace_next_token_with(oTokenClass.simple_name) - iCurrent = utils.assign_next_token_required(")", oTokenClass.aggregate_close_parenthesis, iToken, lObjects) + while oDataStructure.is_next_token(","): + oDataStructure.replace_next_token_with(oTokenClass.aggregate_comma) + oDataStructure.replace_next_token_with(oTokenClass.simple_name) - return iCurrent + oDataStructure.replace_next_token_required(")", oTokenClass.aggregate_close_parenthesis) diff --git a/vsg/vhdlFile/classify/array_type_definition.py b/vsg/vhdlFile/classify/array_type_definition.py index 08b049310..e879b59df 100644 --- a/vsg/vhdlFile/classify/array_type_definition.py +++ b/vsg/vhdlFile/classify/array_type_definition.py @@ -6,19 +6,14 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ array_type_definition ::= unbounded_array_definition | constrained_array_definition """ - iCurrent = unbounded_array_definition.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if unbounded_array_definition.detect(oDataStructure): + return True - iCurrent = constrained_array_definition.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent - - return iToken + return constrained_array_definition.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/composite_type_definition.py b/vsg/vhdlFile/classify/composite_type_definition.py index c5efc5c8f..9738997fc 100644 --- a/vsg/vhdlFile/classify/composite_type_definition.py +++ b/vsg/vhdlFile/classify/composite_type_definition.py @@ -1,22 +1,16 @@ # -*- coding: utf-8 -*- - from vsg.vhdlFile.classify import array_type_definition, record_type_definition -def detect(iToken, lObjects): +def detect(oDataStructure): """ composite_type_definition ::= array_type_definition | record_type_definition """ - iCurrent = array_type_definition.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent - - iCurrent = record_type_definition.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if array_type_definition.detect(oDataStructure): + return True - return iToken + return record_type_definition.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/enumeration_type_definition.py b/vsg/vhdlFile/classify/enumeration_type_definition.py index a2ba3876e..69bd88e4d 100644 --- a/vsg/vhdlFile/classify/enumeration_type_definition.py +++ b/vsg/vhdlFile/classify/enumeration_type_definition.py @@ -4,15 +4,15 @@ from vsg.vhdlFile import utils -def detect(iToken, lObjects): +def detect(oDataStructure): """ enumeration_type_definition ::= ( enumeration_literal { , enumeration_literal } ) """ - if utils.is_next_token("(", iToken, lObjects): - return classify(iToken, lObjects) - - return iToken + if oDataStructure.is_next_token("("): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/full_type_declaration.py b/vsg/vhdlFile/classify/full_type_declaration.py index 73a343817..3ad7e1af1 100644 --- a/vsg/vhdlFile/classify/full_type_declaration.py +++ b/vsg/vhdlFile/classify/full_type_declaration.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg.token import full_type_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier, type_definition @@ -17,15 +16,13 @@ def detect(oDataStructure): return False -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("type", token.type_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.type_keyword) - iCurrent = identifier.classify(iCurrent, lObjects, token.identifier) + identifier.classify(oDataStructure, token.identifier) - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("is", token.is_keyword) - iCurrent = type_definition.detect(iCurrent, lObjects) + type_definition.detect(oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/index_subtype_definition.py b/vsg/vhdlFile/classify/index_subtype_definition.py index 4d1c41a0e..15cdd822a 100644 --- a/vsg/vhdlFile/classify/index_subtype_definition.py +++ b/vsg/vhdlFile/classify/index_subtype_definition.py @@ -1,17 +1,15 @@ # -*- coding: utf-8 -*- from vsg.token import index_subtype_definition as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import type_mark -def classify(iToken, lObjects): +def classify(oDataStructure): """ index_subtype_definition ::= type_mark range <> """ - iCurrent = type_mark.classify(iToken, lObjects) - iCurrent = utils.assign_next_token_required("range", token.range_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("<>", token.undefined_range, iCurrent, lObjects) - return iCurrent + type_mark.classify(oDataStructure) + oDataStructure.replace_next_token_required("range", token.range_keyword) + oDataStructure.replace_next_token_required("<>", token.undefined_range) diff --git a/vsg/vhdlFile/classify/integer_type_definition.py b/vsg/vhdlFile/classify/integer_type_definition.py index 518a0e51c..60182c0a2 100644 --- a/vsg/vhdlFile/classify/integer_type_definition.py +++ b/vsg/vhdlFile/classify/integer_type_definition.py @@ -3,10 +3,10 @@ from vsg.vhdlFile.classify import range_constraint -def detect(iToken, lObjects): +def detect(oDataStructure): """ integer_type_definition ::= range_constraint """ - return range_constraint.detect(iToken, lObjects) + range_constraint.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/physical_type_definition.py b/vsg/vhdlFile/classify/physical_type_definition.py index a381ea265..4ce8342ef 100644 --- a/vsg/vhdlFile/classify/physical_type_definition.py +++ b/vsg/vhdlFile/classify/physical_type_definition.py @@ -9,7 +9,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ physical_type_definition ::= range_constraint @@ -18,9 +18,10 @@ def detect(iToken, lObjects): { secondary_unit_declaration } **end** **units** [ physical_type_simple_name ] """ - if units_keyword_found_before_semicolon(iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if units_keyword_found_before_semicolon(oDataStructure): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): @@ -40,7 +41,7 @@ def classify(iToken, lObjects): return iCurrent -def units_keyword_found_before_semicolon(iToken, lObjects): - if utils.find_in_range("units", iToken, ";", lObjects): +def units_keyword_found_before_semicolon(oDataStructure): + if oDataStructure.does_string_exist_before_string("units", ";"): return True return False diff --git a/vsg/vhdlFile/classify/scalar_type_definition.py b/vsg/vhdlFile/classify/scalar_type_definition.py index 74c973096..8cc033b54 100644 --- a/vsg/vhdlFile/classify/scalar_type_definition.py +++ b/vsg/vhdlFile/classify/scalar_type_definition.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- - from vsg.vhdlFile.classify import ( enumeration_type_definition, integer_type_definition, @@ -8,7 +7,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ scalar_type_definition ::= enumeration_type_definition @@ -20,16 +19,10 @@ def detect(iToken, lObjects): They are very similar to integer types, and will hopefully not be required. """ - iReturn = physical_type_definition.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn - - iReturn = enumeration_type_definition.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if physical_type_definition.detect(oDataStructure): + return True - iReturn = integer_type_definition.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if enumeration_type_definition.detect(oDataStructure): + return True - return iToken + return integer_type_definition.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/simple_variable_assignment.py b/vsg/vhdlFile/classify/simple_variable_assignment.py index 1b10b2384..2ff20e57d 100644 --- a/vsg/vhdlFile/classify/simple_variable_assignment.py +++ b/vsg/vhdlFile/classify/simple_variable_assignment.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg.token import simple_variable_assignment as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, target @@ -22,23 +21,10 @@ def detect(oDataStructure): return False -# if utils.is_next_token_one_of(["when", "if", "elsif", "else"], iToken, lObjects): -# return False -# if utils.find_in_range(":=", iToken, ";", lObjects): -# if utils.find_in_range("with", iToken, ";", lObjects): -# return False -# if utils.find_in_range("when", iToken, ";", lObjects): -# return False -# return True -# return False +def classify(oDataStructure): + target.classify(oDataStructure, token) + oDataStructure.replace_next_token_required(":=", token.assignment) + expression.classify_until([";"], oDataStructure) -def classify(iToken, lObjects): - iCurrent = target.classify(iToken, lObjects, token) - iCurrent = utils.assign_next_token_required(":=", token.assignment, iCurrent, lObjects) - - iCurrent = expression.classify_until([";"], iCurrent, lObjects) - - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/target.py b/vsg/vhdlFile/classify/target.py index d315b8eab..7fc008366 100644 --- a/vsg/vhdlFile/classify/target.py +++ b/vsg/vhdlFile/classify/target.py @@ -1,16 +1,15 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import aggregate +from vsg.vhdlFile.classify import aggregate, utils -def classify(iToken, lObjects, oTokenClass): +def classify(oDataStructure, oTokenClass): """ target ::= name | aggregate """ - if utils.is_next_token("(", iToken, lObjects): - return aggregate.classify(iToken, lObjects, oTokenClass) + if oDataStructure.is_next_token("("): + aggregate.classify(oDataStructure, oTokenClass) else: - return utils.assign_tokens_until(":=", oTokenClass.simple_name, iToken, lObjects) + utils.assign_tokens_until(":=", oTokenClass.simple_name, oDataStructure) diff --git a/vsg/vhdlFile/classify/type_definition.py b/vsg/vhdlFile/classify/type_definition.py index 20193bf71..1ba5d3ed2 100644 --- a/vsg/vhdlFile/classify/type_definition.py +++ b/vsg/vhdlFile/classify/type_definition.py @@ -9,7 +9,7 @@ ) -def detect(iToken, lObjects): +def detect(oDataStructure): """ type_definition ::= scalar_type_definition @@ -19,24 +19,16 @@ def detect(iToken, lObjects): | protected_type_definition """ - iReturn = scalar_type_definition.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if scalar_type_definition.detect(oDataStructure): + return True - iReturn = access_type_definition.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if access_type_definition.detect(oDataStructure): + return True - iReturn = composite_type_definition.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if composite_type_definition.detect(oDataStructure): + return True - iReturn = file_type_definition.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if file_type_definition.detect(oDataStructure): + return True - iReturn = protected_type_definition.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn - - return iToken + return protected_type_definition.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/unbounded_array_definition.py b/vsg/vhdlFile/classify/unbounded_array_definition.py index a5c811dcb..59108086c 100644 --- a/vsg/vhdlFile/classify/unbounded_array_definition.py +++ b/vsg/vhdlFile/classify/unbounded_array_definition.py @@ -1,36 +1,32 @@ # -*- coding: utf-8 -*- from vsg.token import unbounded_array_definition as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import index_subtype_definition, subtype_indication -def detect(iToken, lObjects): +def detect(oDataStructure): """ unbounded_array_definition ::= array ( index_subtype_definition { , index_subtype_definition } ) of *element*_subtype_indication """ - if utils.is_next_token("array", iToken, lObjects): - if utils.find_in_next_n_tokens("<>", 5, iToken, lObjects): - return classify(iToken, lObjects) - else: - return iToken + if oDataStructure.is_next_token("array"): + if oDataStructure.does_string_exist_in_next_n_tokens("<>", 5): + classify(oDataStructure) + return True + return False - return iToken +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.array_keyword) + oDataStructure.replace_next_token_required("(", token.open_parenthesis) + index_subtype_definition.classify(oDataStructure) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("array", token.array_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) - iCurrent = index_subtype_definition.classify(iToken, lObjects) + while oDataStructure.is_next_token(","): + oDataStructure.replace_next_token_with(token.comma) + index_subtype_definition.classify(oDataStructure) - while utils.is_next_token(",", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(",", token.comma, iCurrent, lObjects) - iCurrent = index_subtype_definition.classify(iCurrent, lObjects) - - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("of", token.of_keyword, iCurrent, lObjects) - iCurrent = subtype_indication.classify(iCurrent, lObjects) - return iCurrent + oDataStructure.replace_next_token_required(")", token.close_parenthesis) + oDataStructure.replace_next_token_required("of", token.of_keyword) + subtype_indication.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index bd51edf68..2292d2354 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -204,3 +204,8 @@ def keyword_found(sKeyword, oDataStructure): if oDataStructure.are_next_consecutive_tokens([None, ":", "wait"]): return True return False + + +def assign_tokens_until(sToken, token, oDataStructure): + while not oDataStructure.is_next_token(sToken): + oDataStructure.replace_next_token_with(token) From 625b5702ee11db6d6b9f8a6312b041065ece522d Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 9 Feb 2025 10:13:36 -0600 Subject: [PATCH 032/124] Parsing unary operators. --- ...oncurrent_conditional_signal_assignment.py | 2 +- .../concurrent_signal_assignment_statement.py | 20 +++++----- .../concurrent_simple_signal_assignment.py | 19 ++++----- vsg/vhdlFile/classify/delay_mechanism.py | 9 +++-- vsg/vhdlFile/classify/if_statement.py | 40 +++++++++---------- .../classify/sequence_of_statements.py | 11 ++--- vsg/vhdlFile/classify/utils.py | 10 +++-- vsg/vhdlFile/classify/waveform.py | 26 +++++------- vsg/vhdlFile/classify/waveform_element.py | 17 ++++---- vsg/vhdlFile/utils.py | 8 ---- 10 files changed, 71 insertions(+), 91 deletions(-) diff --git a/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py index 171a4d68b..639a8abc2 100644 --- a/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py @@ -25,7 +25,7 @@ def detect(oDataStructure): oDataStructure.align_seek_index() while not oDataStructure.seek_token_lower_value_is(";"): if bAssignmentFound: - if utils.object_value_is(lObjects, iCurrent, "when"): + if oDataStructure.seek_token_lower_value_is("when"): return True else: if oDataStructure.seek_token_lower_value_is("when"): diff --git a/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py b/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py index d33716863..b533c5451 100644 --- a/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py +++ b/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- from vsg.token import concurrent_signal_assignment_statement as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( concurrent_conditional_signal_assignment, concurrent_selected_signal_assignment, concurrent_simple_signal_assignment, + utils, ) @@ -18,21 +18,21 @@ def detect(oDataStructure): """ if concurrent_selected_signal_assignment.detect(oDataStructure): - iCurrent = utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) - iCurrent = utils.tokenize_postponed(oDataStructure, token.postponed_keyword) - iCurrent = concurrent_selected_signal_assignment.classify(oDataStructure) + utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) + utils.tokenize_postponed(oDataStructure, token.postponed_keyword) + concurrent_selected_signal_assignment.classify(oDataStructure) return True elif concurrent_conditional_signal_assignment.detect(oDataStructure): - iCurrent = utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) - iCurrent = utils.tokenize_postponed(oDataStructure, token.postponed_keyword) - iCurrent = concurrent_conditional_signal_assignment.classify(oDataStructure) + utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) + utils.tokenize_postponed(oDataStructure, token.postponed_keyword) + concurrent_conditional_signal_assignment.classify(oDataStructure) return True elif concurrent_simple_signal_assignment.detect(oDataStructure): - iCurrent = utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) - iCurrent = utils.tokenize_postponed(oDataStructure, token.postponed_keyword) - iCurrent = concurrent_simple_signal_assignment.classify(oDataStructure) + utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) + utils.tokenize_postponed(oDataStructure, token.postponed_keyword) + concurrent_simple_signal_assignment.classify(oDataStructure) return True return False diff --git a/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py index 104f329b2..78ec5f186 100644 --- a/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- from vsg.token import concurrent_simple_signal_assignment as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import delay_mechanism, waveform +from vsg.vhdlFile.classify import delay_mechanism, utils, waveform def detect(oDataStructure): @@ -23,15 +22,13 @@ def detect(oDataStructure): return False -def classify(iToken, lObjects): - iCurrent = utils.assign_tokens_until("<=", token.target, iToken, lObjects) - iCurrent = utils.assign_next_token_required("<=", token.assignment, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if("guarded", token.guarded_keyword, iCurrent, lObjects) +def classify(oDataStructure): + utils.assign_tokens_until("<=", token.target, oDataStructure) + oDataStructure.replace_next_token_required("<=", token.assignment) + oDataStructure.replace_next_token_with_if("guarded", token.guarded_keyword) - iCurrent = delay_mechanism.detect(iCurrent, lObjects) + delay_mechanism.detect(oDataStructure) - iCurrent = waveform.classify_until([";"], iCurrent, lObjects) + waveform.classify_until([";"], oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/delay_mechanism.py b/vsg/vhdlFile/classify/delay_mechanism.py index da5730326..a682dd4c5 100644 --- a/vsg/vhdlFile/classify/delay_mechanism.py +++ b/vsg/vhdlFile/classify/delay_mechanism.py @@ -5,15 +5,16 @@ from vsg.vhdlFile.classify import expression -def detect(iToken, lObjects): +def detect(oDataStructure): """ delay_mechanism ::= transport | [ reject *time*_expression ] inertial """ - if utils.is_next_token_one_of(["transport", "reject", "inertial"], iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token_one_of(["transport", "reject", "inertial"]): + classify(oDataStructure) + return True + return False def classify(iToken, lObjects): diff --git a/vsg/vhdlFile/classify/if_statement.py b/vsg/vhdlFile/classify/if_statement.py index 7119612b8..47b61705d 100644 --- a/vsg/vhdlFile/classify/if_statement.py +++ b/vsg/vhdlFile/classify/if_statement.py @@ -16,33 +16,31 @@ def detect(oDataStructure): sequence_of_statements ] end if [ if_label ] ; """ - if utils.keyword_found("if", oDataStructure): classify(oDataStructure) return True return False -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.if_label, token.label_colon) - iCurrent = utils.assign_next_token_required("if", token.if_keyword, iCurrent, lObjects) - iCurrent = condition.classify_until(["then"], iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("then", token.then_keyword, iCurrent, lObjects) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.if_label, token.label_colon) + oDataStructure.replace_next_token_required("if", token.if_keyword) + condition.classify_until(["then"], oDataStructure) + oDataStructure.replace_next_token_required("then", token.then_keyword) - iCurrent = sequence_of_statements.detect(iCurrent, lObjects) + sequence_of_statements.detect(oDataStructure) - while utils.is_next_token_one_of(["else", "elsif"], iCurrent, lObjects): - if utils.is_next_token("elsif", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("elsif", token.elsif_keyword, iCurrent, lObjects) - iCurrent = condition.classify_until(["then"], iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("then", token.then_keyword, iCurrent, lObjects) - iCurrent = sequence_of_statements.detect(iCurrent, lObjects) + while oDataStructure.is_next_token_one_of(["else", "elsif"]): + if oDataStructure.is_next_token("elsif"): + oDataStructure.replace_next_token_with(token.elsif_keyword) + condition.classify_until(["then"], oDataStructure) + oDataStructure.replace_next_token_required("then", token.then_keyword) + iCurrent = sequence_of_statements.detect(oDataStructure) else: - iCurrent = utils.assign_next_token_required("else", token.else_keyword, iCurrent, lObjects) - iCurrent = sequence_of_statements.detect(iCurrent, lObjects) - - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("if", token.end_if_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.end_if_label, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - return iCurrent + oDataStructure.replace_next_token_with(token.else_keyword) + sequence_of_statements.detect(oDataStructure) + + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_required("if", token.end_if_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.end_if_label) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/sequence_of_statements.py b/vsg/vhdlFile/classify/sequence_of_statements.py index e577fb2d1..c5c77360b 100644 --- a/vsg/vhdlFile/classify/sequence_of_statements.py +++ b/vsg/vhdlFile/classify/sequence_of_statements.py @@ -3,15 +3,10 @@ from vsg.vhdlFile.classify import sequential_statement -def detect(iToken, lObjects): +def detect(oDataStructure): """ sequence_of_statements ::= { sequential_statement } """ - - iLast = 0 - iCurrent = iToken - while iLast != iCurrent: - iLast = iCurrent - iCurrent = sequential_statement.detect(iCurrent, lObjects) - return iCurrent + while sequential_statement.detect(oDataStructure): + pass diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 2292d2354..23eb77eff 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from vsg import parser -from vsg.token import direction, exponent +from vsg.token import choice, direction, element_association, exponent from vsg.vhdlFile import utils @@ -199,9 +199,9 @@ def tokenize_label(oDataStructure, label_token, colon_token): def keyword_found(sKeyword, oDataStructure): - if oDataStructure.is_next_token("wait"): + if oDataStructure.is_next_token(sKeyword): return True - if oDataStructure.are_next_consecutive_tokens([None, ":", "wait"]): + if oDataStructure.are_next_consecutive_tokens([None, ":", sKeyword]): return True return False @@ -209,3 +209,7 @@ def keyword_found(sKeyword, oDataStructure): def assign_tokens_until(sToken, token, oDataStructure): while not oDataStructure.is_next_token(sToken): oDataStructure.replace_next_token_with(token) + + +def tokenize_postponed(oDataStructure, token): + oDataStructure.replace_next_token_with_if("postponed", token) diff --git a/vsg/vhdlFile/classify/waveform.py b/vsg/vhdlFile/classify/waveform.py index 63c7b26de..159256298 100644 --- a/vsg/vhdlFile/classify/waveform.py +++ b/vsg/vhdlFile/classify/waveform.py @@ -2,30 +2,26 @@ from vsg import parser from vsg.token import waveform as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import waveform_element -def classify_until(lUntils, iToken, lObjects): +def classify_until(lUntils, oDataStructure): """ waveform ::= waveform_element { , waveform_element } | unaffected """ - if utils.is_next_token("unaffected", iToken, lObjects): - return utils.assign_next_token_required("unaffected", token.unaffected_keyword, iToken, lObjects) + if oDataStructure.is_next_token("unaffected"): + oDataStructure.replace_next_token_with(token.unaffected_keyword) + else: + lMyUntils = lUntils + lMyUntils.append(",") - iCurrent = iToken - lMyUntils = lUntils - lMyUntils.append(",") + waveform_element.classify_until(lMyUntils, oDataStructure) - iCurrent = waveform_element.classify_until(lMyUntils, iCurrent, lObjects) + while oDataStructure.is_next_token(","): + oDataStructure.replace_next_token_with(token.comma) + waveform_element.classify_until(lMyUntils, oDataStructure) - while utils.is_next_token(",", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(",", token.comma, iCurrent, lObjects) - iCurrent = waveform_element.classify_until(lMyUntils, iCurrent, lObjects) - - iCurrent = utils.assign_next_token_if(")", parser.todo, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_with_if(")", parser.todo) diff --git a/vsg/vhdlFile/classify/waveform_element.py b/vsg/vhdlFile/classify/waveform_element.py index 5d6c3a625..00e60f816 100644 --- a/vsg/vhdlFile/classify/waveform_element.py +++ b/vsg/vhdlFile/classify/waveform_element.py @@ -1,26 +1,23 @@ # -*- coding: utf-8 -*- from vsg.token import waveform_element as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression -def classify_until(lUntils, iToken, lObjects): +def classify_until(lUntils, oDataStructure): """ waveform_element ::= *value*_expression [ after *time*_expression ] | null [ after *time*_expression ] """ - if utils.is_next_token("null", iToken, lObjects): - iCurrent = utils.assign_next_token_required("null", token.null_keyword, iToken, lObjects) + if oDataStructure.is_next_token("null"): + oDataStructure.replace_next_token_with(token.null_keyword) else: lMyUntils = lUntils lMyUntils.append("after") - iCurrent = expression.classify_until(lMyUntils, iToken, lObjects) + expression.classify_until(lMyUntils, oDataStructure) - if utils.is_next_token("after", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("after", token.after_keyword, iCurrent, lObjects) - iCurrent = expression.classify_until(lUntils, iCurrent, lObjects) - - return iCurrent + if oDataStructure.is_next_token("after"): + oDataStructure.replace_next_token_with(token.after_keyword) + expression.classify_until(lUntils, oDataStructure) diff --git a/vsg/vhdlFile/utils.py b/vsg/vhdlFile/utils.py index ac02ed0b1..92248660c 100644 --- a/vsg/vhdlFile/utils.py +++ b/vsg/vhdlFile/utils.py @@ -300,14 +300,6 @@ def has_label(iObject, lObjects): return False -def tokenize_postponed(iObject, lObjects, token): - iIndex = find_next_token(iObject, lObjects) - if object_value_is(lObjects, iIndex, "postponed"): - assign_token(lObjects, iIndex, token) - return iIndex + 1 - return iObject - - def tokenize_label(iToken, lObjects, label_token, colon_token): iCurrent = find_next_token(iToken, lObjects) iItemCount = 0 From a16dbd5363b60c7e40cf5b1066ea8180f99f3a90 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 8 Mar 2025 08:31:00 -0600 Subject: [PATCH 033/124] Adding decorators module. --- vsg/decorators.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 vsg/decorators.py diff --git a/vsg/decorators.py b/vsg/decorators.py new file mode 100644 index 000000000..949911a40 --- /dev/null +++ b/vsg/decorators.py @@ -0,0 +1,39 @@ + +import functools + +def print_method_name(func): + @functools.wraps(func) + def wrapper(*args, **kwargs): + class_name = args[0].__class__.__name__ if args else "N/A" + print(f"-->> {__name__}") + print(f"Calling method: {class_name}.{func.__name__}") + return func(*args, **kwargs) + return wrapper + +level = 0 +display = True + +def print_classifier_debug_info(argument): + print_classifier_debug_info.level = 0 + def decorator(function): + def wrapper(*args, **kwargs): + if display: + global level + sArgument = argument.replace("vsg.vhdlFile.classify.","") + sLevel = " " * (2 * level) + sEntering = f"Entering: {sLevel} {sArgument}.{function.__name__} " + sEntering += "-"*(100 - len(sEntering)) + print(sEntering) + level += 1 + + results = function(*args, **kwargs) + + if display: + sExiting = f"Exiting: {sLevel} {sArgument}.{function.__name__} == {results} " + sExiting += "-"*(100 - len(sExiting)) + print(sExiting) + level -= 1 + + return results + return wrapper + return decorator From 4edd414342068293fe2665b0732d40544129dc22 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 8 Mar 2025 09:23:06 -0600 Subject: [PATCH 034/124] Adding decorators to all classifiers. --- vsg/vhdlFile/classify/access_type_definition.py | 3 +++ vsg/vhdlFile/classify/actual_parameter_part.py | 2 ++ vsg/vhdlFile/classify/aggregate.py | 3 +++ vsg/vhdlFile/classify/alias_declaration.py | 3 +++ vsg/vhdlFile/classify/architecture_body.py | 3 +++ .../classify/architecture_declarative_part.py | 2 ++ .../classify/architecture_statement_part.py | 2 ++ vsg/vhdlFile/classify/array_constraint.py | 4 ++++ vsg/vhdlFile/classify/array_element_constraint.py | 2 ++ vsg/vhdlFile/classify/array_type_definition.py | 2 ++ vsg/vhdlFile/classify/assertion.py | 2 ++ vsg/vhdlFile/classify/assertion_statement.py | 3 +++ vsg/vhdlFile/classify/association_element.py | 5 +++++ vsg/vhdlFile/classify/association_list.py | 2 ++ vsg/vhdlFile/classify/attribute_declaration.py | 3 +++ vsg/vhdlFile/classify/attribute_name.py | 4 ++++ vsg/vhdlFile/classify/attribute_specification.py | 3 +++ vsg/vhdlFile/classify/binding_indication.py | 3 +++ vsg/vhdlFile/classify/bit_string_literal.py | 3 +++ vsg/vhdlFile/classify/block_configuration.py | 3 +++ vsg/vhdlFile/classify/block_declarative_item.py | 2 ++ vsg/vhdlFile/classify/block_declarative_part.py | 2 ++ vsg/vhdlFile/classify/block_header.py | 2 ++ vsg/vhdlFile/classify/block_specification.py | 2 ++ vsg/vhdlFile/classify/block_statement.py | 3 +++ vsg/vhdlFile/classify/block_statement_part.py | 2 ++ vsg/vhdlFile/classify/case_generate_alternative.py | 3 +++ vsg/vhdlFile/classify/case_generate_statement.py | 3 +++ vsg/vhdlFile/classify/case_statement.py | 3 +++ .../classify/case_statement_alternative.py | 3 +++ vsg/vhdlFile/classify/character_literal.py | 3 +++ vsg/vhdlFile/classify/choice.py | 2 ++ vsg/vhdlFile/classify/choices.py | 2 ++ vsg/vhdlFile/classify/comment.py | 7 +++++++ vsg/vhdlFile/classify/component_configuration.py | 3 +++ vsg/vhdlFile/classify/component_declaration.py | 3 +++ .../classify/component_instantiation_statement.py | 3 +++ vsg/vhdlFile/classify/component_specification.py | 3 +++ vsg/vhdlFile/classify/composite_type_definition.py | 2 ++ .../classify/concurrent_assertion_statement.py | 3 +++ .../concurrent_conditional_signal_assignment.py | 3 +++ .../concurrent_procedure_call_statement.py | 2 ++ .../concurrent_selected_signal_assignment.py | 3 +++ .../concurrent_signal_assignment_statement.py | 2 ++ .../concurrent_simple_signal_assignment.py | 3 +++ vsg/vhdlFile/classify/concurrent_statement.py | 2 ++ vsg/vhdlFile/classify/condition.py | 2 ++ vsg/vhdlFile/classify/condition_clause.py | 3 +++ vsg/vhdlFile/classify/conditional_expressions.py | 2 ++ .../classify/conditional_force_assignment.py | 3 +++ .../classify/conditional_signal_assignment.py | 3 +++ .../classify/conditional_variable_assignment.py | 3 +++ .../classify/conditional_waveform_assignment.py | 3 +++ vsg/vhdlFile/classify/conditional_waveforms.py | 2 ++ vsg/vhdlFile/classify/configuration_declaration.py | 5 +++++ .../classify/configuration_declarative_item.py | 2 ++ .../classify/configuration_declarative_part.py | 2 ++ vsg/vhdlFile/classify/configuration_item.py | 3 +++ .../classify/configuration_specification.py | 2 ++ vsg/vhdlFile/classify/constant_declaration.py | 3 +++ .../classify/constrained_array_definition.py | 3 +++ vsg/vhdlFile/classify/constraint.py | 2 ++ vsg/vhdlFile/classify/context_clause.py | 2 ++ vsg/vhdlFile/classify/context_declaration.py | 3 +++ vsg/vhdlFile/classify/context_item.py | 2 ++ vsg/vhdlFile/classify/context_reference.py | 3 +++ vsg/vhdlFile/classify/delay_mechanism.py | 3 +++ vsg/vhdlFile/classify/design_file.py | 2 ++ vsg/vhdlFile/classify/design_unit.py | 2 ++ vsg/vhdlFile/classify/discrete_range.py | 4 ++++ vsg/vhdlFile/classify/element_constraint.py | 2 ++ vsg/vhdlFile/classify/element_declaration.py | 2 ++ vsg/vhdlFile/classify/element_resolution.py | 2 ++ .../classify/element_subtype_definition.py | 2 ++ vsg/vhdlFile/classify/entity_aspect.py | 2 ++ vsg/vhdlFile/classify/entity_declaration.py | 3 +++ vsg/vhdlFile/classify/entity_declarative_item.py | 2 ++ vsg/vhdlFile/classify/entity_declarative_part.py | 2 ++ vsg/vhdlFile/classify/entity_designator.py | 2 ++ vsg/vhdlFile/classify/entity_header.py | 2 ++ vsg/vhdlFile/classify/entity_name_list.py | 2 ++ vsg/vhdlFile/classify/entity_specification.py | 2 ++ vsg/vhdlFile/classify/entity_statement.py | 2 ++ vsg/vhdlFile/classify/entity_statement_part.py | 2 ++ .../classify/enumeration_type_definition.py | 3 +++ vsg/vhdlFile/classify/exit_statement.py | 3 +++ vsg/vhdlFile/classify/expression.py | 4 ++++ vsg/vhdlFile/classify/external_constant_name.py | 3 +++ vsg/vhdlFile/classify/external_name.py | 2 ++ vsg/vhdlFile/classify/external_signal_name.py | 3 +++ vsg/vhdlFile/classify/external_variable_name.py | 3 +++ vsg/vhdlFile/classify/file_declaration.py | 3 +++ vsg/vhdlFile/classify/file_logical_name.py | 2 ++ vsg/vhdlFile/classify/file_open_information.py | 3 +++ vsg/vhdlFile/classify/file_type_definition.py | 3 +++ vsg/vhdlFile/classify/for_generate_statement.py | 3 +++ vsg/vhdlFile/classify/force_mode.py | 2 ++ vsg/vhdlFile/classify/formal_parameter_list.py | 2 ++ vsg/vhdlFile/classify/formal_part.py | 2 ++ vsg/vhdlFile/classify/full_type_declaration.py | 3 +++ vsg/vhdlFile/classify/function_specification.py | 3 +++ vsg/vhdlFile/classify/generate_specification.py | 2 ++ vsg/vhdlFile/classify/generate_statement.py | 2 ++ vsg/vhdlFile/classify/generate_statement_body.py | 2 ++ vsg/vhdlFile/classify/generic_clause.py | 3 +++ vsg/vhdlFile/classify/generic_list.py | 2 ++ vsg/vhdlFile/classify/generic_map_aspect.py | 3 +++ vsg/vhdlFile/classify/group_constituent_list.py | 2 ++ vsg/vhdlFile/classify/group_declaration.py | 3 +++ vsg/vhdlFile/classify/identifier.py | 2 ++ vsg/vhdlFile/classify/identifier_list.py | 2 ++ vsg/vhdlFile/classify/if_generate_statement.py | 3 +++ vsg/vhdlFile/classify/if_statement.py | 3 +++ .../classify/incomplete_type_declaration.py | 3 +++ vsg/vhdlFile/classify/index_constraint.py | 3 +++ vsg/vhdlFile/classify/index_subtype_definition.py | 2 ++ vsg/vhdlFile/classify/instantiated_unit.py | 4 ++++ vsg/vhdlFile/classify/instantiation_list.py | 2 ++ vsg/vhdlFile/classify/integer_type_definition.py | 2 ++ .../classify/interface_constant_declaration.py | 3 +++ vsg/vhdlFile/classify/interface_declaration.py | 2 ++ vsg/vhdlFile/classify/interface_element.py | 2 ++ .../classify/interface_file_declaration.py | 3 +++ .../classify/interface_function_specification.py | 3 +++ .../interface_incomplete_type_declaration.py | 3 +++ vsg/vhdlFile/classify/interface_list.py | 2 ++ .../classify/interface_object_declaration.py | 2 ++ .../classify/interface_package_declaration.py | 3 +++ .../interface_package_generic_map_aspect.py | 3 +++ .../classify/interface_procedure_specification.py | 3 +++ .../classify/interface_signal_declaration.py | 3 +++ .../classify/interface_subprogram_declaration.py | 3 +++ .../classify/interface_subprogram_default.py | 2 ++ .../classify/interface_subprogram_specification.py | 2 ++ .../classify/interface_type_declaration.py | 2 ++ .../classify/interface_unknown_declaration.py | 3 +++ .../classify/interface_variable_declaration.py | 3 +++ vsg/vhdlFile/classify/iteration_scheme.py | 3 +++ vsg/vhdlFile/classify/library_clause.py | 3 +++ vsg/vhdlFile/classify/library_unit.py | 2 ++ vsg/vhdlFile/classify/logical_name_list.py | 2 ++ vsg/vhdlFile/classify/loop_statement.py | 3 +++ vsg/vhdlFile/classify/mode.py | 2 ++ vsg/vhdlFile/classify/name.py | 2 ++ vsg/vhdlFile/classify/next_statement.py | 3 +++ vsg/vhdlFile/classify/null_statement.py | 3 +++ vsg/vhdlFile/classify/package_body.py | 3 +++ .../classify/package_body_declarative_item.py | 2 ++ .../classify/package_body_declarative_part.py | 2 ++ vsg/vhdlFile/classify/package_declaration.py | 3 +++ vsg/vhdlFile/classify/package_declarative_item.py | 2 ++ vsg/vhdlFile/classify/package_declarative_part.py | 2 ++ vsg/vhdlFile/classify/package_header.py | 2 ++ .../classify/package_instantiation_declaration.py | 3 +++ vsg/vhdlFile/classify/parameter_specification.py | 2 ++ vsg/vhdlFile/classify/physical_type_definition.py | 4 ++++ vsg/vhdlFile/classify/port_clause.py | 3 +++ vsg/vhdlFile/classify/port_list.py | 2 ++ vsg/vhdlFile/classify/port_map_aspect.py | 3 +++ vsg/vhdlFile/classify/pragma.py | 14 ++++++++++++++ vsg/vhdlFile/classify/prefix.py | 2 ++ vsg/vhdlFile/classify/preprocessor.py | 2 ++ vsg/vhdlFile/classify/primary_unit.py | 2 ++ vsg/vhdlFile/classify/primary_unit_declaration.py | 3 +++ vsg/vhdlFile/classify/procedure_call.py | 3 +++ vsg/vhdlFile/classify/procedure_call_statement.py | 3 +++ vsg/vhdlFile/classify/procedure_specification.py | 3 +++ vsg/vhdlFile/classify/process_declarative_item.py | 2 ++ vsg/vhdlFile/classify/process_declarative_part.py | 2 ++ vsg/vhdlFile/classify/process_sensitivity_list.py | 2 ++ vsg/vhdlFile/classify/process_statement.py | 5 +++++ vsg/vhdlFile/classify/process_statement_part.py | 2 ++ vsg/vhdlFile/classify/protected_type_body.py | 3 +++ .../protected_type_body_declarative_item.py | 2 ++ .../protected_type_body_declarative_part.py | 2 ++ .../classify/protected_type_declaration.py | 3 +++ .../classify/protected_type_declarative_item.py | 2 ++ .../classify/protected_type_declarative_part.py | 2 ++ vsg/vhdlFile/classify/protected_type_definition.py | 2 ++ vsg/vhdlFile/classify/range.py | 3 +++ vsg/vhdlFile/classify/range_constraint.py | 3 +++ vsg/vhdlFile/classify/record_constraint.py | 3 +++ vsg/vhdlFile/classify/record_element_constraint.py | 3 +++ vsg/vhdlFile/classify/record_type_definition.py | 3 +++ vsg/vhdlFile/classify/report_statement.py | 3 +++ vsg/vhdlFile/classify/resolution_indication.py | 7 +++++++ vsg/vhdlFile/classify/return_statement.py | 3 +++ vsg/vhdlFile/classify/scalar_type_definition.py | 2 ++ vsg/vhdlFile/classify/secondary_unit.py | 2 ++ .../classify/secondary_unit_declaration.py | 3 +++ vsg/vhdlFile/classify/selected_expressions.py | 2 ++ vsg/vhdlFile/classify/selected_force_assignment.py | 3 +++ .../classify/selected_signal_assignment.py | 3 +++ .../classify/selected_variable_assignment.py | 3 +++ .../classify/selected_waveform_assignment.py | 3 +++ vsg/vhdlFile/classify/selected_waveforms.py | 2 ++ vsg/vhdlFile/classify/sensitivity_clause.py | 3 +++ vsg/vhdlFile/classify/sensitivity_list.py | 3 +++ vsg/vhdlFile/classify/sequence_of_statements.py | 2 ++ vsg/vhdlFile/classify/sequential_statement.py | 2 ++ .../classify/signal_assignment_statement.py | 2 ++ vsg/vhdlFile/classify/signal_declaration.py | 3 +++ vsg/vhdlFile/classify/signal_kind.py | 3 +++ vsg/vhdlFile/classify/signature.py | 5 +++++ .../classify/simple_configuration_specification.py | 3 +++ vsg/vhdlFile/classify/simple_force_assignment.py | 3 +++ vsg/vhdlFile/classify/simple_release_assignment.py | 3 +++ vsg/vhdlFile/classify/simple_signal_assignment.py | 3 +++ .../classify/simple_variable_assignment.py | 3 +++ .../classify/simple_waveform_assignment.py | 5 +++++ vsg/vhdlFile/classify/subprogram_body.py | 3 +++ vsg/vhdlFile/classify/subprogram_declaration.py | 2 ++ .../classify/subprogram_declarative_item.py | 2 ++ .../classify/subprogram_declarative_part.py | 2 ++ vsg/vhdlFile/classify/subprogram_header.py | 3 +++ .../subprogram_instantiation_declaration.py | 3 +++ vsg/vhdlFile/classify/subprogram_kind.py | 3 +++ vsg/vhdlFile/classify/subprogram_specification.py | 2 ++ vsg/vhdlFile/classify/subprogram_statement_part.py | 2 ++ vsg/vhdlFile/classify/subtype_declaration.py | 3 +++ vsg/vhdlFile/classify/subtype_indication.py | 2 ++ vsg/vhdlFile/classify/target.py | 2 ++ vsg/vhdlFile/classify/timeout_clause.py | 3 +++ vsg/vhdlFile/classify/type_declaration.py | 2 ++ vsg/vhdlFile/classify/type_definition.py | 2 ++ vsg/vhdlFile/classify/type_mark.py | 2 ++ .../classify/unbounded_array_definition.py | 3 +++ vsg/vhdlFile/classify/use_clause.py | 3 +++ .../classify/variable_assignment_statement.py | 2 ++ vsg/vhdlFile/classify/variable_declaration.py | 3 +++ vsg/vhdlFile/classify/wait_statement.py | 3 +++ vsg/vhdlFile/classify/waveform.py | 2 ++ vsg/vhdlFile/classify/waveform_element.py | 2 ++ vsg/vhdlFile/classify/whitespace.py | 6 ++++++ 234 files changed, 633 insertions(+) diff --git a/vsg/vhdlFile/classify/access_type_definition.py b/vsg/vhdlFile/classify/access_type_definition.py index cf63758a5..0f8600238 100644 --- a/vsg/vhdlFile/classify/access_type_definition.py +++ b/vsg/vhdlFile/classify/access_type_definition.py @@ -3,8 +3,10 @@ from vsg.token import access_type_definition as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ access_type_definition ::= @@ -17,6 +19,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("access", token.access_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/actual_parameter_part.py b/vsg/vhdlFile/classify/actual_parameter_part.py index 9fa40f844..048cb6d26 100644 --- a/vsg/vhdlFile/classify/actual_parameter_part.py +++ b/vsg/vhdlFile/classify/actual_parameter_part.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import association_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iTokent, lObjects): """ actual_parameter_part ::= diff --git a/vsg/vhdlFile/classify/aggregate.py b/vsg/vhdlFile/classify/aggregate.py index 639a98e10..9fa8a03dd 100644 --- a/vsg/vhdlFile/classify/aggregate.py +++ b/vsg/vhdlFile/classify/aggregate.py @@ -1,6 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators + +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure, oTokenClass): """ aggregate ::= diff --git a/vsg/vhdlFile/classify/alias_declaration.py b/vsg/vhdlFile/classify/alias_declaration.py index 37bfce2da..5cef30b7f 100644 --- a/vsg/vhdlFile/classify/alias_declaration.py +++ b/vsg/vhdlFile/classify/alias_declaration.py @@ -3,8 +3,10 @@ from vsg.token import alias_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import name, signature, subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ alias_declaration ::= @@ -17,6 +19,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("alias", token.alias_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/architecture_body.py b/vsg/vhdlFile/classify/architecture_body.py index c3dbadc4c..914c3a629 100644 --- a/vsg/vhdlFile/classify/architecture_body.py +++ b/vsg/vhdlFile/classify/architecture_body.py @@ -5,8 +5,10 @@ architecture_declarative_part, architecture_statement_part, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ architecture identifier of *entity*_name is @@ -22,6 +24,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with(token.architecture_keyword) oDataStructure.replace_next_token_with(token.identifier) diff --git a/vsg/vhdlFile/classify/architecture_declarative_part.py b/vsg/vhdlFile/classify/architecture_declarative_part.py index 99f7dd5ae..f84bb26f6 100644 --- a/vsg/vhdlFile/classify/architecture_declarative_part.py +++ b/vsg/vhdlFile/classify/architecture_declarative_part.py @@ -2,8 +2,10 @@ from vsg.vhdlFile import utils from vsg.vhdlFile.classify import block_declarative_item +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ architecture_declarative_part ::= diff --git a/vsg/vhdlFile/classify/architecture_statement_part.py b/vsg/vhdlFile/classify/architecture_statement_part.py index 29aba472e..4d900a9bf 100644 --- a/vsg/vhdlFile/classify/architecture_statement_part.py +++ b/vsg/vhdlFile/classify/architecture_statement_part.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import concurrent_statement +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ architecture_statement_part ::= diff --git a/vsg/vhdlFile/classify/array_constraint.py b/vsg/vhdlFile/classify/array_constraint.py index 8a4c194af..f7e61de2a 100644 --- a/vsg/vhdlFile/classify/array_constraint.py +++ b/vsg/vhdlFile/classify/array_constraint.py @@ -2,8 +2,10 @@ from vsg.token import array_constraint as token from vsg.vhdlFile.classify import array_element_constraint, index_constraint +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ array_constraint ::= @@ -21,6 +23,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def detect_discrete_subtype_indication(oDataStructure): oDataStructure.align_seek_index() if oDataStructure.is_next_seek_token("("): @@ -29,6 +32,7 @@ def detect_discrete_subtype_indication(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def open_detected(oDataStructure): return oDataStructure.are_next_consecutive_tokens(["(", "open"]) diff --git a/vsg/vhdlFile/classify/array_element_constraint.py b/vsg/vhdlFile/classify/array_element_constraint.py index ec95e7deb..a150ed171 100644 --- a/vsg/vhdlFile/classify/array_element_constraint.py +++ b/vsg/vhdlFile/classify/array_element_constraint.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import element_constraint +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ array_element_constraint ::= element_constraint diff --git a/vsg/vhdlFile/classify/array_type_definition.py b/vsg/vhdlFile/classify/array_type_definition.py index e879b59df..c15556087 100644 --- a/vsg/vhdlFile/classify/array_type_definition.py +++ b/vsg/vhdlFile/classify/array_type_definition.py @@ -4,8 +4,10 @@ constrained_array_definition, unbounded_array_definition, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ array_type_definition ::= diff --git a/vsg/vhdlFile/classify/assertion.py b/vsg/vhdlFile/classify/assertion.py index 002639f69..01b3244a3 100644 --- a/vsg/vhdlFile/classify/assertion.py +++ b/vsg/vhdlFile/classify/assertion.py @@ -3,8 +3,10 @@ from vsg.token import assertion as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import condition, expression +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ assertion ::= diff --git a/vsg/vhdlFile/classify/assertion_statement.py b/vsg/vhdlFile/classify/assertion_statement.py index e041e3d01..214ec7e99 100644 --- a/vsg/vhdlFile/classify/assertion_statement.py +++ b/vsg/vhdlFile/classify/assertion_statement.py @@ -2,8 +2,10 @@ from vsg.token import assertion_statement as token from vsg.vhdlFile.classify import assertion, utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ assertion_statement ::= @@ -15,6 +17,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.tokenize_label(iToken, lObjects, token.label, token.label_colon) diff --git a/vsg/vhdlFile/classify/association_element.py b/vsg/vhdlFile/classify/association_element.py index 107d931d6..aee916266 100644 --- a/vsg/vhdlFile/classify/association_element.py +++ b/vsg/vhdlFile/classify/association_element.py @@ -2,8 +2,10 @@ from vsg.token import association_element as token from vsg.vhdlFile.classify import formal_part +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ association_element ::= @@ -33,16 +35,19 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): classify_formal_part(oDataStructure) classify_actual_part(oDataStructure) +@decorators.print_classifier_debug_info(__name__) def classify_formal_part(oDataStructure): if oDataStructure.does_string_exist_before_seek_index_honoring_parenthesis_hierarchy("=>"): formal_part.classify(oDataStructure, token.formal_part) oDataStructure.replace_next_token_with(token.assignment) +@decorators.print_classifier_debug_info(__name__) def classify_actual_part(oDataStructure): oDataStructure.replace_tokens_from_current_to_seek_with(token.actual_part) diff --git a/vsg/vhdlFile/classify/association_list.py b/vsg/vhdlFile/classify/association_list.py index 5c6a4a60e..4a31a473b 100644 --- a/vsg/vhdlFile/classify/association_list.py +++ b/vsg/vhdlFile/classify/association_list.py @@ -2,8 +2,10 @@ from vsg.token import association_list as token from vsg.vhdlFile.classify import association_element +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): """ association_list ::= diff --git a/vsg/vhdlFile/classify/attribute_declaration.py b/vsg/vhdlFile/classify/attribute_declaration.py index 9386a3861..fc12120ba 100644 --- a/vsg/vhdlFile/classify/attribute_declaration.py +++ b/vsg/vhdlFile/classify/attribute_declaration.py @@ -3,8 +3,10 @@ from vsg.token import attribute_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import type_mark +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ attribute_declaration ::= @@ -16,6 +18,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("attribute", token.attribute_keyword, iToken, lObjects) iCurrent = utils.assign_next_token(token.identifier, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/attribute_name.py b/vsg/vhdlFile/classify/attribute_name.py index 696f76ade..f700624a5 100644 --- a/vsg/vhdlFile/classify/attribute_name.py +++ b/vsg/vhdlFile/classify/attribute_name.py @@ -3,8 +3,10 @@ from vsg import parser from vsg.token import attribute_name as token from vsg.vhdlFile.classify import expression, prefix, signature +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ attribute_name ::= @@ -27,11 +29,13 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def skip_prefix(oDataStructure): oDataStructure.increment_seek_index() oDataStructure.advance_seek_over_parenthesis() +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): prefix.classify(oDataStructure, token) diff --git a/vsg/vhdlFile/classify/attribute_specification.py b/vsg/vhdlFile/classify/attribute_specification.py index 0d3f86e89..972d8ba1b 100644 --- a/vsg/vhdlFile/classify/attribute_specification.py +++ b/vsg/vhdlFile/classify/attribute_specification.py @@ -3,8 +3,10 @@ from vsg.token import attribute_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_specification, expression +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ attribute_specification ::= @@ -16,6 +18,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("attribute", token.attribute_keyword, iToken, lObjects) iCurrent = utils.assign_next_token(token.attribute_designator, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/binding_indication.py b/vsg/vhdlFile/classify/binding_indication.py index 0529508b9..7fd7f8346 100644 --- a/vsg/vhdlFile/classify/binding_indication.py +++ b/vsg/vhdlFile/classify/binding_indication.py @@ -3,8 +3,10 @@ from vsg.token import binding_indication as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_aspect, generic_map_aspect, port_map_aspect +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): if utils.is_next_token("use", iToken, lObjects): return classify(iToken, lObjects) @@ -15,6 +17,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ binding_indication ::= diff --git a/vsg/vhdlFile/classify/bit_string_literal.py b/vsg/vhdlFile/classify/bit_string_literal.py index fd15d2da7..21bbf4fd9 100644 --- a/vsg/vhdlFile/classify/bit_string_literal.py +++ b/vsg/vhdlFile/classify/bit_string_literal.py @@ -3,12 +3,14 @@ import re from vsg.token import bit_string_literal as token +from vsg import decorators oIntegerRegex = re.compile(r"\d+") oBaseSpecifierRegex = re.compile(r"(([us]?[box])|d)") oBitValueStringRegex = re.compile(r'"[0-9a-fhluwxz\-_]*"') +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ bit_string_literal ::= @@ -30,6 +32,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure, bInt): if bInt: oDataStructure.replace_next_token_with(token.integer) diff --git a/vsg/vhdlFile/classify/block_configuration.py b/vsg/vhdlFile/classify/block_configuration.py index 982d1b87b..1f457d621 100644 --- a/vsg/vhdlFile/classify/block_configuration.py +++ b/vsg/vhdlFile/classify/block_configuration.py @@ -2,8 +2,10 @@ from vsg.token import block_configuration as token from vsg.vhdlFile.classify import block_specification, configuration_item, use_clause +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ block_configuration ::= @@ -19,6 +21,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with(token.for_keyword) diff --git a/vsg/vhdlFile/classify/block_declarative_item.py b/vsg/vhdlFile/classify/block_declarative_item.py index 341cdceb0..43f7cbb27 100644 --- a/vsg/vhdlFile/classify/block_declarative_item.py +++ b/vsg/vhdlFile/classify/block_declarative_item.py @@ -20,8 +20,10 @@ use_clause, variable_declaration, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ block_declarative_item ::= diff --git a/vsg/vhdlFile/classify/block_declarative_part.py b/vsg/vhdlFile/classify/block_declarative_part.py index 31660273c..e3e00a2ef 100644 --- a/vsg/vhdlFile/classify/block_declarative_part.py +++ b/vsg/vhdlFile/classify/block_declarative_part.py @@ -2,8 +2,10 @@ from vsg.vhdlFile import utils from vsg.vhdlFile.classify import block_declarative_item +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ block_declarative_part ::= diff --git a/vsg/vhdlFile/classify/block_header.py b/vsg/vhdlFile/classify/block_header.py index 74a5e9305..79911bc0c 100644 --- a/vsg/vhdlFile/classify/block_header.py +++ b/vsg/vhdlFile/classify/block_header.py @@ -8,8 +8,10 @@ port_clause, port_map_aspect, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ block_header ::= diff --git a/vsg/vhdlFile/classify/block_specification.py b/vsg/vhdlFile/classify/block_specification.py index bfdc9a306..90169acd6 100644 --- a/vsg/vhdlFile/classify/block_specification.py +++ b/vsg/vhdlFile/classify/block_specification.py @@ -3,8 +3,10 @@ from vsg.token import block_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generate_specification +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ block_specification ::= diff --git a/vsg/vhdlFile/classify/block_statement.py b/vsg/vhdlFile/classify/block_statement.py index f5a2a94ce..cca4cc3db 100644 --- a/vsg/vhdlFile/classify/block_statement.py +++ b/vsg/vhdlFile/classify/block_statement.py @@ -7,8 +7,10 @@ block_header, block_statement_part, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ block_statement ::= @@ -27,6 +29,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.tokenize_label(iToken, lObjects, token.block_label, token.label_colon) iCurrent = utils.assign_next_token_required("block", token.block_keyword, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/block_statement_part.py b/vsg/vhdlFile/classify/block_statement_part.py index eacd05b30..88e294c98 100644 --- a/vsg/vhdlFile/classify/block_statement_part.py +++ b/vsg/vhdlFile/classify/block_statement_part.py @@ -2,8 +2,10 @@ from vsg.vhdlFile import utils from vsg.vhdlFile.classify import concurrent_statement +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ block_statement_part ::= diff --git a/vsg/vhdlFile/classify/case_generate_alternative.py b/vsg/vhdlFile/classify/case_generate_alternative.py index fee312c27..b8b05c6cf 100644 --- a/vsg/vhdlFile/classify/case_generate_alternative.py +++ b/vsg/vhdlFile/classify/case_generate_alternative.py @@ -3,8 +3,10 @@ from vsg.token import case_generate_alternative as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import choices, generate_statement_body +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ case_generate_alternative ::= @@ -17,6 +19,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("when", token.when_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/case_generate_statement.py b/vsg/vhdlFile/classify/case_generate_statement.py index eaa10f4ed..28ff2c783 100644 --- a/vsg/vhdlFile/classify/case_generate_statement.py +++ b/vsg/vhdlFile/classify/case_generate_statement.py @@ -3,8 +3,10 @@ from vsg.token import case_generate_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import case_generate_alternative, expression +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ case_generate_statement ::= @@ -25,6 +27,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.tokenize_label(iToken, lObjects, token.generate_label, token.label_colon) diff --git a/vsg/vhdlFile/classify/case_statement.py b/vsg/vhdlFile/classify/case_statement.py index b489668cd..ed4cc90b3 100644 --- a/vsg/vhdlFile/classify/case_statement.py +++ b/vsg/vhdlFile/classify/case_statement.py @@ -2,8 +2,10 @@ from vsg.token import case_statement as token from vsg.vhdlFile.classify import case_statement_alternative, expression, utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ case_statement ::= @@ -19,6 +21,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.tokenize_label(iToken, lObjects, token.case_label, token.label_colon) iCurrent = utils.assign_next_token_required("case", token.case_keyword, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/case_statement_alternative.py b/vsg/vhdlFile/classify/case_statement_alternative.py index 63d0c6a0c..0acf50b18 100644 --- a/vsg/vhdlFile/classify/case_statement_alternative.py +++ b/vsg/vhdlFile/classify/case_statement_alternative.py @@ -3,8 +3,10 @@ from vsg.token import case_statement_alternative as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import choices, sequence_of_statements +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ case_statement_alternative ::= @@ -16,6 +18,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("when", token.when_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/character_literal.py b/vsg/vhdlFile/classify/character_literal.py index dd6a9b479..ff716850b 100644 --- a/vsg/vhdlFile/classify/character_literal.py +++ b/vsg/vhdlFile/classify/character_literal.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg import parser +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ character_literal ::= @@ -17,5 +19,6 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with(parser.character_literal) diff --git a/vsg/vhdlFile/classify/choice.py b/vsg/vhdlFile/classify/choice.py index 8a5e7b7d1..eeba6d2fa 100644 --- a/vsg/vhdlFile/classify/choice.py +++ b/vsg/vhdlFile/classify/choice.py @@ -3,8 +3,10 @@ from vsg import parser from vsg.token import choice as token from vsg.vhdlFile import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, iToken, lObjects): """ choice ::= diff --git a/vsg/vhdlFile/classify/choices.py b/vsg/vhdlFile/classify/choices.py index bd36e4c23..cb5ab92bb 100644 --- a/vsg/vhdlFile/classify/choices.py +++ b/vsg/vhdlFile/classify/choices.py @@ -3,8 +3,10 @@ from vsg.token import choices as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import choice +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, iToken, lObjects): """ choices ::= diff --git a/vsg/vhdlFile/classify/comment.py b/vsg/vhdlFile/classify/comment.py index 38320f823..eb272d10f 100644 --- a/vsg/vhdlFile/classify/comment.py +++ b/vsg/vhdlFile/classify/comment.py @@ -2,8 +2,10 @@ from vsg import parser from vsg.token import delimited_comment as token +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(lTokens, lObjects, oOptions): if len(lObjects) == 0 and oOptions.inside_delimited_comment(): lObjects.append(token.text("")) @@ -18,6 +20,7 @@ def classify(lTokens, lObjects, oOptions): merge_text_tokens(lObjects) +@decorators.print_classifier_debug_info(__name__) def classify_closing_comment_delimiters(iToken, lObjects, oOptions): sToken = lObjects[iToken].get_value() if oOptions.inside_delimited_comment() and sToken == "*/": @@ -25,10 +28,12 @@ def classify_closing_comment_delimiters(iToken, lObjects, oOptions): oOptions.clear_inside_delimited_comment() +@decorators.print_classifier_debug_info(__name__) def classify_opening_comment_delimiters(iToken, lObjects, oOptions): classify_delimited_comment_open_keyword(iToken, lObjects, oOptions) +@decorators.print_classifier_debug_info(__name__) def classify_single_line_comment(iToken, lObjects, oOptions): sToken = lObjects[iToken].get_value() if not oOptions.inside_delimited_comment() and sToken.startswith("--"): @@ -53,6 +58,7 @@ def classify_single_line_comment(iToken, lObjects, oOptions): return False +@decorators.print_classifier_debug_info(__name__) def classify_delimited_comment_open_keyword(iToken, lObjects, oOptions): sToken = lObjects[iToken].get_value() if not oOptions.inside_delimited_comment() and sToken == "/*": @@ -60,6 +66,7 @@ def classify_delimited_comment_open_keyword(iToken, lObjects, oOptions): oOptions.set_inside_delimited_comment() +@decorators.print_classifier_debug_info(__name__) def classify_delimited_comment_text(iToken, lObjects, oOptions): sToken = lObjects[iToken].get_value() if oOptions.inside_delimited_comment(): diff --git a/vsg/vhdlFile/classify/component_configuration.py b/vsg/vhdlFile/classify/component_configuration.py index 2b5ea6588..20b3dc6cc 100644 --- a/vsg/vhdlFile/classify/component_configuration.py +++ b/vsg/vhdlFile/classify/component_configuration.py @@ -7,8 +7,10 @@ block_configuration, component_specification, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): if utils.is_next_token("for", iToken, lObjects): iCurrent = utils.find_next_token(iToken, lObjects) + 1 @@ -17,6 +19,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ component_configuration ::= diff --git a/vsg/vhdlFile/classify/component_declaration.py b/vsg/vhdlFile/classify/component_declaration.py index b4a14ae83..ad2d500fb 100644 --- a/vsg/vhdlFile/classify/component_declaration.py +++ b/vsg/vhdlFile/classify/component_declaration.py @@ -3,8 +3,10 @@ from vsg.token import component_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_clause, port_clause +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ component_declaration ::= @@ -20,6 +22,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = classify_opening_declaration(iToken, lObjects) diff --git a/vsg/vhdlFile/classify/component_instantiation_statement.py b/vsg/vhdlFile/classify/component_instantiation_statement.py index 2ec9497f9..50887c638 100644 --- a/vsg/vhdlFile/classify/component_instantiation_statement.py +++ b/vsg/vhdlFile/classify/component_instantiation_statement.py @@ -3,8 +3,10 @@ from vsg.token import component_instantiation_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_map_aspect, instantiated_unit, port_map_aspect +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ component_instantiation_statement ::= @@ -21,6 +23,7 @@ def detect(oDataStructure): return instantiated_unit.detect(oDataStructure) +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.tokenize_label(iToken, lObjects, token.instantiation_label, token.label_colon) diff --git a/vsg/vhdlFile/classify/component_specification.py b/vsg/vhdlFile/classify/component_specification.py index a07a7445a..a0d5e55af 100644 --- a/vsg/vhdlFile/classify/component_specification.py +++ b/vsg/vhdlFile/classify/component_specification.py @@ -3,8 +3,10 @@ from vsg.token import component_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import instantiation_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): iCurrent = iToken @@ -17,6 +19,7 @@ def detect(iToken, lObjects): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ component_specification ::= diff --git a/vsg/vhdlFile/classify/composite_type_definition.py b/vsg/vhdlFile/classify/composite_type_definition.py index 9738997fc..f4012da54 100644 --- a/vsg/vhdlFile/classify/composite_type_definition.py +++ b/vsg/vhdlFile/classify/composite_type_definition.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import array_type_definition, record_type_definition +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ composite_type_definition ::= diff --git a/vsg/vhdlFile/classify/concurrent_assertion_statement.py b/vsg/vhdlFile/classify/concurrent_assertion_statement.py index 9072c5611..9ce74eac4 100644 --- a/vsg/vhdlFile/classify/concurrent_assertion_statement.py +++ b/vsg/vhdlFile/classify/concurrent_assertion_statement.py @@ -3,8 +3,10 @@ from vsg.token import concurrent_assertion_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import assertion +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ concurrent_assertion_statement ::= @@ -23,6 +25,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.tokenize_label(iToken, lObjects, token.label_name, token.label_colon) diff --git a/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py index 639a8abc2..e80580b5c 100644 --- a/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py @@ -3,8 +3,10 @@ from vsg.token import concurrent_conditional_signal_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import conditional_waveforms, delay_mechanism +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ @@ -42,6 +44,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ concurrent_conditional_signal_assignment ::= diff --git a/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py b/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py index 674a15836..745f966b0 100644 --- a/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py +++ b/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py @@ -3,8 +3,10 @@ from vsg.token import concurrent_procedure_call_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import procedure_call +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ concurrent_procedure_call_statement ::= diff --git a/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py index 6c17bdbf7..505319e08 100644 --- a/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py @@ -3,8 +3,10 @@ from vsg.token import concurrent_selected_signal_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import delay_mechanism, expression, selected_waveforms +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ concurrent_selected_signal_assignment ::= @@ -19,6 +21,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("with", token.with_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py b/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py index b533c5451..b07e5d099 100644 --- a/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py +++ b/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py @@ -7,8 +7,10 @@ concurrent_simple_signal_assignment, utils, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ concurrent_signal_assignment_statement ::= diff --git a/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py index 78ec5f186..33dae0813 100644 --- a/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py @@ -2,8 +2,10 @@ from vsg.token import concurrent_simple_signal_assignment as token from vsg.vhdlFile.classify import delay_mechanism, utils, waveform +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ [ label : ] [ postponed ] concurrent_simple_signal_assignment @@ -22,6 +24,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): utils.assign_tokens_until("<=", token.target, oDataStructure) oDataStructure.replace_next_token_required("<=", token.assignment) diff --git a/vsg/vhdlFile/classify/concurrent_statement.py b/vsg/vhdlFile/classify/concurrent_statement.py index 6962a4e23..68f3a65f8 100644 --- a/vsg/vhdlFile/classify/concurrent_statement.py +++ b/vsg/vhdlFile/classify/concurrent_statement.py @@ -9,8 +9,10 @@ generate_statement, process_statement, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ concurrent_statement ::= diff --git a/vsg/vhdlFile/classify/condition.py b/vsg/vhdlFile/classify/condition.py index 4a115a12e..514076397 100644 --- a/vsg/vhdlFile/classify/condition.py +++ b/vsg/vhdlFile/classify/condition.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import expression +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, oDataStructure): """ condition ::= diff --git a/vsg/vhdlFile/classify/condition_clause.py b/vsg/vhdlFile/classify/condition_clause.py index 7e3411754..87728a5d6 100644 --- a/vsg/vhdlFile/classify/condition_clause.py +++ b/vsg/vhdlFile/classify/condition_clause.py @@ -2,8 +2,10 @@ from vsg.token import condition_clause as token from vsg.vhdlFile.classify import condition +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ condition_clause ::= @@ -15,6 +17,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, oDataStructure): oDataStructure.replace_next_token_with(token.until_keyword) diff --git a/vsg/vhdlFile/classify/conditional_expressions.py b/vsg/vhdlFile/classify/conditional_expressions.py index 8e69f3516..32fed07d8 100644 --- a/vsg/vhdlFile/classify/conditional_expressions.py +++ b/vsg/vhdlFile/classify/conditional_expressions.py @@ -3,8 +3,10 @@ from vsg.token import conditional_expressions as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import condition, expression +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, iToken, lObjects): """ conditional_expressions ::= diff --git a/vsg/vhdlFile/classify/conditional_force_assignment.py b/vsg/vhdlFile/classify/conditional_force_assignment.py index aff0fb304..422a254ee 100644 --- a/vsg/vhdlFile/classify/conditional_force_assignment.py +++ b/vsg/vhdlFile/classify/conditional_force_assignment.py @@ -3,8 +3,10 @@ from vsg.token import conditional_force_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import conditional_expressions, force_mode +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ conditional_force_assignment ::= @@ -19,6 +21,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_tokens_until("<=", token.target, iToken, lObjects) iCurrent = utils.assign_next_token_required("<=", token.assignment, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/conditional_signal_assignment.py b/vsg/vhdlFile/classify/conditional_signal_assignment.py index 3f919420c..58962ce72 100644 --- a/vsg/vhdlFile/classify/conditional_signal_assignment.py +++ b/vsg/vhdlFile/classify/conditional_signal_assignment.py @@ -5,8 +5,10 @@ conditional_force_assignment, conditional_waveform_assignment, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ conditional_signal_assignment ::= @@ -24,6 +26,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = conditional_force_assignment.detect(iToken, lObjects) if iCurrent != iToken: diff --git a/vsg/vhdlFile/classify/conditional_variable_assignment.py b/vsg/vhdlFile/classify/conditional_variable_assignment.py index c279d1555..aa184eb70 100644 --- a/vsg/vhdlFile/classify/conditional_variable_assignment.py +++ b/vsg/vhdlFile/classify/conditional_variable_assignment.py @@ -3,8 +3,10 @@ from vsg.token import conditional_variable_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import conditional_expressions +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ conditional_variable_assignment ::= @@ -29,6 +31,7 @@ def detect(oDataStructure): # return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_tokens_until(":=", token.target, iToken, lObjects) iCurrent = utils.assign_next_token_required(":=", token.assignment, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/conditional_waveform_assignment.py b/vsg/vhdlFile/classify/conditional_waveform_assignment.py index 391cd38a5..bd77e2e83 100644 --- a/vsg/vhdlFile/classify/conditional_waveform_assignment.py +++ b/vsg/vhdlFile/classify/conditional_waveform_assignment.py @@ -3,8 +3,10 @@ from vsg.token import conditional_waveform_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import conditional_waveforms, delay_mechanism +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ conditional_waveform_assignment ::= @@ -19,6 +21,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_tokens_until("<=", token.target, iToken, lObjects) iCurrent = utils.assign_next_token_required("<=", token.assignment, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/conditional_waveforms.py b/vsg/vhdlFile/classify/conditional_waveforms.py index b87ba67d9..901096c9c 100644 --- a/vsg/vhdlFile/classify/conditional_waveforms.py +++ b/vsg/vhdlFile/classify/conditional_waveforms.py @@ -3,8 +3,10 @@ from vsg.token import conditional_waveforms as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import condition, waveform +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, iToken, lObjects): """ conditional_waveforms ::= diff --git a/vsg/vhdlFile/classify/configuration_declaration.py b/vsg/vhdlFile/classify/configuration_declaration.py index d614c0ca8..08bde5a51 100644 --- a/vsg/vhdlFile/classify/configuration_declaration.py +++ b/vsg/vhdlFile/classify/configuration_declaration.py @@ -2,8 +2,10 @@ from vsg.token import configuration_declaration as token from vsg.vhdlFile.classify import block_configuration, configuration_declarative_part +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ configuration_declaration ::= @@ -20,6 +22,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): classify_opening_declaration(oDataStructure) @@ -30,6 +33,7 @@ def classify(oDataStructure): classify_closing_declaration(oDataStructure) +@decorators.print_classifier_debug_info(__name__) def classify_opening_declaration(oDataStructure): oDataStructure.replace_next_token_with(token.configuration_keyword) oDataStructure.replace_next_token_with(token.identifier) @@ -38,6 +42,7 @@ def classify_opening_declaration(oDataStructure): oDataStructure.replace_next_token_required("is", token.is_keyword) +@decorators.print_classifier_debug_info(__name__) def classify_closing_declaration(oDataStructure): oDataStructure.replace_next_token_required("end", token.end_keyword) oDataStructure.replace_next_token_if("configuration", token.end_configuration_keyword) diff --git a/vsg/vhdlFile/classify/configuration_declarative_item.py b/vsg/vhdlFile/classify/configuration_declarative_item.py index a122e4e1f..f8fc9662a 100644 --- a/vsg/vhdlFile/classify/configuration_declarative_item.py +++ b/vsg/vhdlFile/classify/configuration_declarative_item.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import attribute_specification, group_declaration, use_clause +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ configuration_declarative_item ::= diff --git a/vsg/vhdlFile/classify/configuration_declarative_part.py b/vsg/vhdlFile/classify/configuration_declarative_part.py index 9b2c91862..a966cb5de 100644 --- a/vsg/vhdlFile/classify/configuration_declarative_part.py +++ b/vsg/vhdlFile/classify/configuration_declarative_part.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import configuration_declarative_item +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ configuration_declarative_part ::= diff --git a/vsg/vhdlFile/classify/configuration_item.py b/vsg/vhdlFile/classify/configuration_item.py index 5bdfca2f2..051dea280 100644 --- a/vsg/vhdlFile/classify/configuration_item.py +++ b/vsg/vhdlFile/classify/configuration_item.py @@ -1,12 +1,15 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import block_configuration, component_configuration +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): return classify(iToken, lObjects) +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ configuration_item ::= diff --git a/vsg/vhdlFile/classify/configuration_specification.py b/vsg/vhdlFile/classify/configuration_specification.py index bf85f5410..9aaa496aa 100644 --- a/vsg/vhdlFile/classify/configuration_specification.py +++ b/vsg/vhdlFile/classify/configuration_specification.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import simple_configuration_specification +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ configuration_specification ::= diff --git a/vsg/vhdlFile/classify/constant_declaration.py b/vsg/vhdlFile/classify/constant_declaration.py index bab9730ef..31499ba4d 100644 --- a/vsg/vhdlFile/classify/constant_declaration.py +++ b/vsg/vhdlFile/classify/constant_declaration.py @@ -2,8 +2,10 @@ from vsg.token import constant_declaration as token from vsg.vhdlFile.classify import expression, identifier_list, subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ constant_declaration ::= @@ -16,6 +18,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with(token.constant_keyword) diff --git a/vsg/vhdlFile/classify/constrained_array_definition.py b/vsg/vhdlFile/classify/constrained_array_definition.py index e26ce1130..58f3b9bf0 100644 --- a/vsg/vhdlFile/classify/constrained_array_definition.py +++ b/vsg/vhdlFile/classify/constrained_array_definition.py @@ -3,8 +3,10 @@ from vsg.token import constrained_array_definition as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import index_constraint, subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ constrained_array_definition ::= @@ -20,6 +22,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("array", token.array_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/constraint.py b/vsg/vhdlFile/classify/constraint.py index aba94a379..4a2fce5e7 100644 --- a/vsg/vhdlFile/classify/constraint.py +++ b/vsg/vhdlFile/classify/constraint.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import array_constraint, range_constraint, record_constraint +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ constraint ::= diff --git a/vsg/vhdlFile/classify/context_clause.py b/vsg/vhdlFile/classify/context_clause.py index f6b65c286..7d39bdd3d 100644 --- a/vsg/vhdlFile/classify/context_clause.py +++ b/vsg/vhdlFile/classify/context_clause.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import context_item, utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ context_clause ::= diff --git a/vsg/vhdlFile/classify/context_declaration.py b/vsg/vhdlFile/classify/context_declaration.py index bc91a8b7d..ffeb9bb5f 100644 --- a/vsg/vhdlFile/classify/context_declaration.py +++ b/vsg/vhdlFile/classify/context_declaration.py @@ -2,8 +2,10 @@ from vsg.token import context_declaration as token from vsg.vhdlFile.classify import context_clause +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ context_declaration ::= @@ -19,6 +21,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_current_token_with(token.context_keyword) oDataStructure.replace_next_token_with(token.identifier) diff --git a/vsg/vhdlFile/classify/context_item.py b/vsg/vhdlFile/classify/context_item.py index 02e6ce225..f49b05b99 100644 --- a/vsg/vhdlFile/classify/context_item.py +++ b/vsg/vhdlFile/classify/context_item.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import context_reference, library_clause, use_clause +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ context_item ::= diff --git a/vsg/vhdlFile/classify/context_reference.py b/vsg/vhdlFile/classify/context_reference.py index e5af5ae74..6a4b2380b 100644 --- a/vsg/vhdlFile/classify/context_reference.py +++ b/vsg/vhdlFile/classify/context_reference.py @@ -2,8 +2,10 @@ from vsg.token import context_reference as token from vsg.vhdlFile.classify import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ context_reference ::= @@ -16,6 +18,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_current_token_with(token.keyword) utils.classify_selected_name(oDataStructure, token) diff --git a/vsg/vhdlFile/classify/delay_mechanism.py b/vsg/vhdlFile/classify/delay_mechanism.py index a682dd4c5..b31847c88 100644 --- a/vsg/vhdlFile/classify/delay_mechanism.py +++ b/vsg/vhdlFile/classify/delay_mechanism.py @@ -3,8 +3,10 @@ from vsg.token import delay_mechanism as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ delay_mechanism ::= @@ -17,6 +19,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): if utils.is_next_token("transport", iToken, lObjects): return utils.assign_next_token_required("transport", token.transport_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/design_file.py b/vsg/vhdlFile/classify/design_file.py index 77f544b34..b39025d16 100644 --- a/vsg/vhdlFile/classify/design_file.py +++ b/vsg/vhdlFile/classify/design_file.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import design_unit +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def tokenize(oDataStructure): """ design_file ::= diff --git a/vsg/vhdlFile/classify/design_unit.py b/vsg/vhdlFile/classify/design_unit.py index dd1ab7945..6b7789402 100644 --- a/vsg/vhdlFile/classify/design_unit.py +++ b/vsg/vhdlFile/classify/design_unit.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import context_clause, library_unit +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ design_unit ::= diff --git a/vsg/vhdlFile/classify/discrete_range.py b/vsg/vhdlFile/classify/discrete_range.py index b25a7fcdb..11217f427 100644 --- a/vsg/vhdlFile/classify/discrete_range.py +++ b/vsg/vhdlFile/classify/discrete_range.py @@ -3,8 +3,10 @@ from vsg import parser from vsg.vhdlFile import utils from vsg.vhdlFile.classify import range, subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ discrete_range ::= @@ -16,6 +18,7 @@ def detect(oDataStructure): return range.detect(oDataStructure) +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ discrete_range ::= @@ -25,6 +28,7 @@ def classify(iToken, lObjects): return utils.assign_token(lObjects, iToken, parser.todo) +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, oDataStructure): iOpenParenthesis = 0 iCloseParenthesis = 0 diff --git a/vsg/vhdlFile/classify/element_constraint.py b/vsg/vhdlFile/classify/element_constraint.py index c550ebca3..4372675ff 100644 --- a/vsg/vhdlFile/classify/element_constraint.py +++ b/vsg/vhdlFile/classify/element_constraint.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import array_constraint, record_constraint +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ element_constraint ::= diff --git a/vsg/vhdlFile/classify/element_declaration.py b/vsg/vhdlFile/classify/element_declaration.py index 9862e3bdc..955e9423a 100644 --- a/vsg/vhdlFile/classify/element_declaration.py +++ b/vsg/vhdlFile/classify/element_declaration.py @@ -3,8 +3,10 @@ from vsg.token import element_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import element_subtype_definition, identifier_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ element_declaration ::= diff --git a/vsg/vhdlFile/classify/element_resolution.py b/vsg/vhdlFile/classify/element_resolution.py index 04841d453..d131b207f 100644 --- a/vsg/vhdlFile/classify/element_resolution.py +++ b/vsg/vhdlFile/classify/element_resolution.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, iToken, lObjects): iCurrent = iToken iLast = 0 diff --git a/vsg/vhdlFile/classify/element_subtype_definition.py b/vsg/vhdlFile/classify/element_subtype_definition.py index 8433d379b..59977439d 100644 --- a/vsg/vhdlFile/classify/element_subtype_definition.py +++ b/vsg/vhdlFile/classify/element_subtype_definition.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ element_subtype_definition ::= diff --git a/vsg/vhdlFile/classify/entity_aspect.py b/vsg/vhdlFile/classify/entity_aspect.py index 4b31712bc..568d3f6ec 100644 --- a/vsg/vhdlFile/classify/entity_aspect.py +++ b/vsg/vhdlFile/classify/entity_aspect.py @@ -2,8 +2,10 @@ from vsg.token import entity_aspect as token from vsg.vhdlFile import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ entity_aspect ::= diff --git a/vsg/vhdlFile/classify/entity_declaration.py b/vsg/vhdlFile/classify/entity_declaration.py index 78cc132b5..c0c3ae2d7 100644 --- a/vsg/vhdlFile/classify/entity_declaration.py +++ b/vsg/vhdlFile/classify/entity_declaration.py @@ -6,8 +6,10 @@ entity_header, entity_statement_part, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ entity_declaration ::= @@ -25,6 +27,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_current_token_with(token.entity_keyword) oDataStructure.replace_next_token_with(token.identifier) diff --git a/vsg/vhdlFile/classify/entity_declarative_item.py b/vsg/vhdlFile/classify/entity_declarative_item.py index c913b5618..f3f5ca801 100644 --- a/vsg/vhdlFile/classify/entity_declarative_item.py +++ b/vsg/vhdlFile/classify/entity_declarative_item.py @@ -19,8 +19,10 @@ use_clause, variable_declaration, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ entity_declarative_item ::= diff --git a/vsg/vhdlFile/classify/entity_declarative_part.py b/vsg/vhdlFile/classify/entity_declarative_part.py index 842063f72..057216bd5 100644 --- a/vsg/vhdlFile/classify/entity_declarative_part.py +++ b/vsg/vhdlFile/classify/entity_declarative_part.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import entity_declarative_item +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ entity_declarative_part ::= diff --git a/vsg/vhdlFile/classify/entity_designator.py b/vsg/vhdlFile/classify/entity_designator.py index f11333adb..92b32c3f0 100644 --- a/vsg/vhdlFile/classify/entity_designator.py +++ b/vsg/vhdlFile/classify/entity_designator.py @@ -3,8 +3,10 @@ from vsg.token import entity_designator as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import signature +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ entity_designator ::= diff --git a/vsg/vhdlFile/classify/entity_header.py b/vsg/vhdlFile/classify/entity_header.py index 5e3a5a732..f2565acfe 100644 --- a/vsg/vhdlFile/classify/entity_header.py +++ b/vsg/vhdlFile/classify/entity_header.py @@ -2,8 +2,10 @@ from vsg.vhdlFile.classify import generic_clause, port_clause +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ entity_header ::= diff --git a/vsg/vhdlFile/classify/entity_name_list.py b/vsg/vhdlFile/classify/entity_name_list.py index 086c60ac0..6493b6b97 100644 --- a/vsg/vhdlFile/classify/entity_name_list.py +++ b/vsg/vhdlFile/classify/entity_name_list.py @@ -3,8 +3,10 @@ from vsg.token import entity_name_list as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_designator +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ entity_name_list ::= diff --git a/vsg/vhdlFile/classify/entity_specification.py b/vsg/vhdlFile/classify/entity_specification.py index f106c188a..ad863cd63 100644 --- a/vsg/vhdlFile/classify/entity_specification.py +++ b/vsg/vhdlFile/classify/entity_specification.py @@ -3,8 +3,10 @@ from vsg.token import entity_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_name_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ entity_specification ::= diff --git a/vsg/vhdlFile/classify/entity_statement.py b/vsg/vhdlFile/classify/entity_statement.py index c6473d6ac..447cf5f88 100644 --- a/vsg/vhdlFile/classify/entity_statement.py +++ b/vsg/vhdlFile/classify/entity_statement.py @@ -5,8 +5,10 @@ concurrent_procedure_call_statement, process_statement, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ entity_statement ::= diff --git a/vsg/vhdlFile/classify/entity_statement_part.py b/vsg/vhdlFile/classify/entity_statement_part.py index 0be1969a3..e1c9c221d 100644 --- a/vsg/vhdlFile/classify/entity_statement_part.py +++ b/vsg/vhdlFile/classify/entity_statement_part.py @@ -2,8 +2,10 @@ from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_statement +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ entity_statement_part ::= diff --git a/vsg/vhdlFile/classify/enumeration_type_definition.py b/vsg/vhdlFile/classify/enumeration_type_definition.py index 69bd88e4d..0b6241334 100644 --- a/vsg/vhdlFile/classify/enumeration_type_definition.py +++ b/vsg/vhdlFile/classify/enumeration_type_definition.py @@ -2,8 +2,10 @@ from vsg.token import enumeration_type_definition as token from vsg.vhdlFile import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ enumeration_type_definition ::= @@ -15,6 +17,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/exit_statement.py b/vsg/vhdlFile/classify/exit_statement.py index 3ff6b2995..8992019ad 100644 --- a/vsg/vhdlFile/classify/exit_statement.py +++ b/vsg/vhdlFile/classify/exit_statement.py @@ -2,8 +2,10 @@ from vsg.token import exit_statement as token from vsg.vhdlFile.classify import condition, utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ exit_statement ::= @@ -16,6 +18,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.tokenize_label(iToken, lObjects, token.label, token.label_colon) diff --git a/vsg/vhdlFile/classify/expression.py b/vsg/vhdlFile/classify/expression.py index 726a8ecf9..697755260 100644 --- a/vsg/vhdlFile/classify/expression.py +++ b/vsg/vhdlFile/classify/expression.py @@ -7,8 +7,10 @@ external_name, utils, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ expression ::= @@ -18,6 +20,7 @@ def classify(iToken, lObjects): return utils.assign_token(lObjects, iToken, parser.todo) +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, oDataStructure, oType=parser.todo): """ expression ::= @@ -53,6 +56,7 @@ def classify_until(lUntils, oDataStructure, oType=parser.todo): utils.assign_special_tokens(oDataStructure, oType) +@decorators.print_classifier_debug_info(__name__) def update_paren_counter(iParen, oDataStructure): if utils.is_current_token_open_paren(oDataStructure): return iParen + 1 diff --git a/vsg/vhdlFile/classify/external_constant_name.py b/vsg/vhdlFile/classify/external_constant_name.py index 68a06f1fc..6333b4dec 100644 --- a/vsg/vhdlFile/classify/external_constant_name.py +++ b/vsg/vhdlFile/classify/external_constant_name.py @@ -3,8 +3,10 @@ from vsg.token import external_constant_name as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ external_constant_name ::= @@ -17,6 +19,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("<<", token.double_less_than, iToken, lObjects) iCurrent = utils.assign_next_token_required("constant", token.constant_keyword, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/external_name.py b/vsg/vhdlFile/classify/external_name.py index d2e662d81..720ad383a 100644 --- a/vsg/vhdlFile/classify/external_name.py +++ b/vsg/vhdlFile/classify/external_name.py @@ -5,8 +5,10 @@ external_signal_name, external_variable_name, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ external_name ::= diff --git a/vsg/vhdlFile/classify/external_signal_name.py b/vsg/vhdlFile/classify/external_signal_name.py index faaf46e8a..d13f6c0c9 100644 --- a/vsg/vhdlFile/classify/external_signal_name.py +++ b/vsg/vhdlFile/classify/external_signal_name.py @@ -3,8 +3,10 @@ from vsg.token import external_signal_name as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ external_signal_name ::= @@ -17,6 +19,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("<<", token.double_less_than, iToken, lObjects) iCurrent = utils.assign_next_token_required("signal", token.signal_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/external_variable_name.py b/vsg/vhdlFile/classify/external_variable_name.py index 20b807242..8a5602f57 100644 --- a/vsg/vhdlFile/classify/external_variable_name.py +++ b/vsg/vhdlFile/classify/external_variable_name.py @@ -3,8 +3,10 @@ from vsg.token import external_variable_name as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ external_variable_name ::= @@ -17,6 +19,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("<<", token.double_less_than, iToken, lObjects) iCurrent = utils.assign_next_token_required("variable", token.variable_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/file_declaration.py b/vsg/vhdlFile/classify/file_declaration.py index 7a365c519..55d024598 100644 --- a/vsg/vhdlFile/classify/file_declaration.py +++ b/vsg/vhdlFile/classify/file_declaration.py @@ -7,8 +7,10 @@ identifier_list, subtype_indication, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ file_declaration ::= @@ -21,6 +23,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("file", token.file_keyword, iToken, lObjects) iCurrent = identifier_list.classify_until([":"], iCurrent, lObjects, token.identifier) diff --git a/vsg/vhdlFile/classify/file_logical_name.py b/vsg/vhdlFile/classify/file_logical_name.py index 9ceebff4d..bf5f76926 100644 --- a/vsg/vhdlFile/classify/file_logical_name.py +++ b/vsg/vhdlFile/classify/file_logical_name.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import expression +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ file_logical_name ::= *string*_expression diff --git a/vsg/vhdlFile/classify/file_open_information.py b/vsg/vhdlFile/classify/file_open_information.py index 3d3e531b8..7ce424826 100644 --- a/vsg/vhdlFile/classify/file_open_information.py +++ b/vsg/vhdlFile/classify/file_open_information.py @@ -3,8 +3,10 @@ from vsg.token import file_open_information as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import file_logical_name +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ file_open_information ::= @@ -16,6 +18,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = iToken diff --git a/vsg/vhdlFile/classify/file_type_definition.py b/vsg/vhdlFile/classify/file_type_definition.py index 77d85affb..652c8f1c7 100644 --- a/vsg/vhdlFile/classify/file_type_definition.py +++ b/vsg/vhdlFile/classify/file_type_definition.py @@ -3,8 +3,10 @@ from vsg.token import file_type_definition as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import type_mark +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ file_type_definition ::= @@ -17,6 +19,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("file", token.file_keyword, iToken, lObjects) iCurrent = utils.assign_next_token_required("of", token.of_keyword, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/for_generate_statement.py b/vsg/vhdlFile/classify/for_generate_statement.py index 53e7c0c77..5463278f5 100644 --- a/vsg/vhdlFile/classify/for_generate_statement.py +++ b/vsg/vhdlFile/classify/for_generate_statement.py @@ -3,8 +3,10 @@ from vsg.token import for_generate_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generate_statement_body, parameter_specification +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ for_generate_statement ::= @@ -24,6 +26,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.tokenize_label(iToken, lObjects, token.generate_label, token.label_colon) diff --git a/vsg/vhdlFile/classify/force_mode.py b/vsg/vhdlFile/classify/force_mode.py index d54a07717..685e9337e 100644 --- a/vsg/vhdlFile/classify/force_mode.py +++ b/vsg/vhdlFile/classify/force_mode.py @@ -2,8 +2,10 @@ from vsg.token import force_mode as token from vsg.vhdlFile import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ force_mode ::= diff --git a/vsg/vhdlFile/classify/formal_parameter_list.py b/vsg/vhdlFile/classify/formal_parameter_list.py index 9cd875e80..a98bfcf3e 100644 --- a/vsg/vhdlFile/classify/formal_parameter_list.py +++ b/vsg/vhdlFile/classify/formal_parameter_list.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import interface_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ formal_parameter_list ::= diff --git a/vsg/vhdlFile/classify/formal_part.py b/vsg/vhdlFile/classify/formal_part.py index 6d8da17c2..4b8a931c7 100644 --- a/vsg/vhdlFile/classify/formal_part.py +++ b/vsg/vhdlFile/classify/formal_part.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg import parser +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure, oTokenType): """ formal_part ::= diff --git a/vsg/vhdlFile/classify/full_type_declaration.py b/vsg/vhdlFile/classify/full_type_declaration.py index 3ad7e1af1..a404af9b7 100644 --- a/vsg/vhdlFile/classify/full_type_declaration.py +++ b/vsg/vhdlFile/classify/full_type_declaration.py @@ -2,8 +2,10 @@ from vsg.token import full_type_declaration as token from vsg.vhdlFile.classify import identifier, type_definition +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ full_type_declaration ::= @@ -16,6 +18,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with(token.type_keyword) diff --git a/vsg/vhdlFile/classify/function_specification.py b/vsg/vhdlFile/classify/function_specification.py index 5bf4257e7..89b65290d 100644 --- a/vsg/vhdlFile/classify/function_specification.py +++ b/vsg/vhdlFile/classify/function_specification.py @@ -3,8 +3,10 @@ from vsg.token import function_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import formal_parameter_list, subprogram_header, type_mark +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ function_specification ::= @@ -20,6 +22,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_if("pure", token.pure_keyword, iToken, lObjects) iCurrent = utils.assign_next_token_if("impure", token.impure_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/generate_specification.py b/vsg/vhdlFile/classify/generate_specification.py index 8a5469c80..150bf04f6 100644 --- a/vsg/vhdlFile/classify/generate_specification.py +++ b/vsg/vhdlFile/classify/generate_specification.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import expression +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ generate_specification ::= diff --git a/vsg/vhdlFile/classify/generate_statement.py b/vsg/vhdlFile/classify/generate_statement.py index e1664aebc..383591649 100644 --- a/vsg/vhdlFile/classify/generate_statement.py +++ b/vsg/vhdlFile/classify/generate_statement.py @@ -5,8 +5,10 @@ for_generate_statement, if_generate_statement, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ generate_statement ::= diff --git a/vsg/vhdlFile/classify/generate_statement_body.py b/vsg/vhdlFile/classify/generate_statement_body.py index 64a53f01e..0e7134c0e 100644 --- a/vsg/vhdlFile/classify/generate_statement_body.py +++ b/vsg/vhdlFile/classify/generate_statement_body.py @@ -3,8 +3,10 @@ from vsg.token import generate_statement_body as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import block_declarative_part, concurrent_statement +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ generate_statement_body ::= diff --git a/vsg/vhdlFile/classify/generic_clause.py b/vsg/vhdlFile/classify/generic_clause.py index b569ec648..a3f862178 100644 --- a/vsg/vhdlFile/classify/generic_clause.py +++ b/vsg/vhdlFile/classify/generic_clause.py @@ -2,8 +2,10 @@ from vsg.token import generic_clause as token from vsg.vhdlFile.classify import generic_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ generic_clause ::= @@ -15,6 +17,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_required("generic", token.generic_keyword) oDataStructure.replace_next_token_required("(", token.open_parenthesis) diff --git a/vsg/vhdlFile/classify/generic_list.py b/vsg/vhdlFile/classify/generic_list.py index f0d8f7450..9b05457ed 100644 --- a/vsg/vhdlFile/classify/generic_list.py +++ b/vsg/vhdlFile/classify/generic_list.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import interface_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ generic_list ::= diff --git a/vsg/vhdlFile/classify/generic_map_aspect.py b/vsg/vhdlFile/classify/generic_map_aspect.py index c3ecfddb9..f7d1c0303 100644 --- a/vsg/vhdlFile/classify/generic_map_aspect.py +++ b/vsg/vhdlFile/classify/generic_map_aspect.py @@ -2,8 +2,10 @@ from vsg.token import generic_map_aspect as token from vsg.vhdlFile.classify import association_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ generic_map_aspect ::= @@ -15,6 +17,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with(token.generic_keyword) oDataStructure.replace_next_token_required("map", token.map_keyword) diff --git a/vsg/vhdlFile/classify/group_constituent_list.py b/vsg/vhdlFile/classify/group_constituent_list.py index c8513106a..720ffeb5d 100644 --- a/vsg/vhdlFile/classify/group_constituent_list.py +++ b/vsg/vhdlFile/classify/group_constituent_list.py @@ -2,8 +2,10 @@ from vsg.token import group_constituent_list as token from vsg.vhdlFile import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ association_list ::= diff --git a/vsg/vhdlFile/classify/group_declaration.py b/vsg/vhdlFile/classify/group_declaration.py index 69fa54603..1210db936 100644 --- a/vsg/vhdlFile/classify/group_declaration.py +++ b/vsg/vhdlFile/classify/group_declaration.py @@ -3,8 +3,10 @@ from vsg.token import group_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import group_constituent_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ group_declaration ::= @@ -17,6 +19,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with("group", token.group_keyword, iToken, lObjects) oDataStructure.replace_next_token_with(token.identifier, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/identifier.py b/vsg/vhdlFile/classify/identifier.py index 2b68d388e..d7fdd742f 100644 --- a/vsg/vhdlFile/classify/identifier.py +++ b/vsg/vhdlFile/classify/identifier.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.token import identifier as token +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure, oType=token.identifier): """ identifier ::= diff --git a/vsg/vhdlFile/classify/identifier_list.py b/vsg/vhdlFile/classify/identifier_list.py index a2102b8a9..9028b5f69 100644 --- a/vsg/vhdlFile/classify/identifier_list.py +++ b/vsg/vhdlFile/classify/identifier_list.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.token import identifier_list as token +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, oDataStructure, oToken=token.identifier): """ identifier_list ::= diff --git a/vsg/vhdlFile/classify/if_generate_statement.py b/vsg/vhdlFile/classify/if_generate_statement.py index c0fe70a9a..3ef47df8e 100644 --- a/vsg/vhdlFile/classify/if_generate_statement.py +++ b/vsg/vhdlFile/classify/if_generate_statement.py @@ -3,8 +3,10 @@ from vsg.token import if_generate_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import condition, generate_statement_body +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ if_generate_statement ::= @@ -28,6 +30,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.tokenize_label(iToken, lObjects, token.generate_label, token.label_colon) diff --git a/vsg/vhdlFile/classify/if_statement.py b/vsg/vhdlFile/classify/if_statement.py index 47b61705d..3e347a4d8 100644 --- a/vsg/vhdlFile/classify/if_statement.py +++ b/vsg/vhdlFile/classify/if_statement.py @@ -2,8 +2,10 @@ from vsg.token import if_statement as token from vsg.vhdlFile.classify import condition, sequence_of_statements, utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ if_statement ::= @@ -22,6 +24,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): utils.tokenize_label(oDataStructure, token.if_label, token.label_colon) oDataStructure.replace_next_token_required("if", token.if_keyword) diff --git a/vsg/vhdlFile/classify/incomplete_type_declaration.py b/vsg/vhdlFile/classify/incomplete_type_declaration.py index 6bda8ec90..15544e273 100644 --- a/vsg/vhdlFile/classify/incomplete_type_declaration.py +++ b/vsg/vhdlFile/classify/incomplete_type_declaration.py @@ -3,8 +3,10 @@ from vsg.token import incomplete_type_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ incomplete_type_declaration ::= @@ -16,6 +18,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("type", token.type_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/index_constraint.py b/vsg/vhdlFile/classify/index_constraint.py index f6b0aaba1..52ad12281 100644 --- a/vsg/vhdlFile/classify/index_constraint.py +++ b/vsg/vhdlFile/classify/index_constraint.py @@ -2,8 +2,10 @@ from vsg.token import index_constraint as token from vsg.vhdlFile.classify import discrete_range +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ index_constraint ::= @@ -17,6 +19,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with(token.open_parenthesis) diff --git a/vsg/vhdlFile/classify/index_subtype_definition.py b/vsg/vhdlFile/classify/index_subtype_definition.py index 15cdd822a..e617b2f56 100644 --- a/vsg/vhdlFile/classify/index_subtype_definition.py +++ b/vsg/vhdlFile/classify/index_subtype_definition.py @@ -2,8 +2,10 @@ from vsg.token import index_subtype_definition as token from vsg.vhdlFile.classify import type_mark +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): """ index_subtype_definition ::= diff --git a/vsg/vhdlFile/classify/instantiated_unit.py b/vsg/vhdlFile/classify/instantiated_unit.py index a02c054b7..9c96bdb5e 100644 --- a/vsg/vhdlFile/classify/instantiated_unit.py +++ b/vsg/vhdlFile/classify/instantiated_unit.py @@ -2,8 +2,10 @@ from vsg.token import instantiated_unit as token from vsg.vhdlFile import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iCurrent, lObjects): """ instantiated_unit ::= @@ -24,6 +26,7 @@ def detect(iCurrent, lObjects): return True +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = iToken @@ -50,6 +53,7 @@ def classify(iToken, lObjects): return iCurrent +@decorators.print_classifier_debug_info(__name__) def classify_entity_name(iToken, lObjects): iCurrent = utils.find_next_token(iToken, lObjects) sTokenValue = lObjects[iCurrent].get_value() diff --git a/vsg/vhdlFile/classify/instantiation_list.py b/vsg/vhdlFile/classify/instantiation_list.py index 3d3698113..6e5789f5f 100644 --- a/vsg/vhdlFile/classify/instantiation_list.py +++ b/vsg/vhdlFile/classify/instantiation_list.py @@ -2,8 +2,10 @@ from vsg.token import instantiation_list as token from vsg.vhdlFile import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ instantiation_list ::= diff --git a/vsg/vhdlFile/classify/integer_type_definition.py b/vsg/vhdlFile/classify/integer_type_definition.py index 60182c0a2..03f232efe 100644 --- a/vsg/vhdlFile/classify/integer_type_definition.py +++ b/vsg/vhdlFile/classify/integer_type_definition.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import range_constraint +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ integer_type_definition ::= diff --git a/vsg/vhdlFile/classify/interface_constant_declaration.py b/vsg/vhdlFile/classify/interface_constant_declaration.py index 73ef2648e..aadf75c70 100644 --- a/vsg/vhdlFile/classify/interface_constant_declaration.py +++ b/vsg/vhdlFile/classify/interface_constant_declaration.py @@ -3,8 +3,10 @@ from vsg.token import interface_constant_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, mode, subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ interface_constant_declaration ::= @@ -16,6 +18,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("constant", token.constant_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/interface_declaration.py b/vsg/vhdlFile/classify/interface_declaration.py index 4f56c3fc1..6cb4334f6 100644 --- a/vsg/vhdlFile/classify/interface_declaration.py +++ b/vsg/vhdlFile/classify/interface_declaration.py @@ -6,8 +6,10 @@ interface_subprogram_declaration, interface_type_declaration, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ interface_declaration ::= diff --git a/vsg/vhdlFile/classify/interface_element.py b/vsg/vhdlFile/classify/interface_element.py index da4d32b1d..0493c1223 100644 --- a/vsg/vhdlFile/classify/interface_element.py +++ b/vsg/vhdlFile/classify/interface_element.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import interface_declaration +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ interface_element ::= diff --git a/vsg/vhdlFile/classify/interface_file_declaration.py b/vsg/vhdlFile/classify/interface_file_declaration.py index b72cd44d7..8158ea630 100644 --- a/vsg/vhdlFile/classify/interface_file_declaration.py +++ b/vsg/vhdlFile/classify/interface_file_declaration.py @@ -3,8 +3,10 @@ from vsg.token import interface_file_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier_list, subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ interface_file_declaration ::= @@ -16,6 +18,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("file", token.file_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/interface_function_specification.py b/vsg/vhdlFile/classify/interface_function_specification.py index 01d15d968..e101532d7 100644 --- a/vsg/vhdlFile/classify/interface_function_specification.py +++ b/vsg/vhdlFile/classify/interface_function_specification.py @@ -3,8 +3,10 @@ from vsg.token import interface_function_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import formal_parameter_list, type_mark +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ interface_function_specification ::= @@ -21,6 +23,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_if("pure", token.pure_keyword, iToken, lObjects) iCurrent = utils.assign_next_token_if("impure", token.impure_keyword, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py b/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py index 8d1be4796..83ad2cd57 100644 --- a/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py +++ b/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py @@ -3,8 +3,10 @@ from vsg.token import interface_incomplete_type_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ interface_incomplete_type_declaration ::= @@ -15,6 +17,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_if("type", token.type_keyword, iToken, lObjects) iCurrent = identifier.classify(iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/interface_list.py b/vsg/vhdlFile/classify/interface_list.py index 1c8de1937..d7e63cc65 100644 --- a/vsg/vhdlFile/classify/interface_list.py +++ b/vsg/vhdlFile/classify/interface_list.py @@ -3,8 +3,10 @@ from vsg.token import interface_list as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import interface_element +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ interface_list ::= diff --git a/vsg/vhdlFile/classify/interface_object_declaration.py b/vsg/vhdlFile/classify/interface_object_declaration.py index 64e193dad..f83378099 100644 --- a/vsg/vhdlFile/classify/interface_object_declaration.py +++ b/vsg/vhdlFile/classify/interface_object_declaration.py @@ -7,8 +7,10 @@ interface_unknown_declaration, interface_variable_declaration, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iCurrent, lObjects): """ interface_object_declaration ::= diff --git a/vsg/vhdlFile/classify/interface_package_declaration.py b/vsg/vhdlFile/classify/interface_package_declaration.py index 6754b201b..47375f557 100644 --- a/vsg/vhdlFile/classify/interface_package_declaration.py +++ b/vsg/vhdlFile/classify/interface_package_declaration.py @@ -3,8 +3,10 @@ from vsg.token import interface_package_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier, interface_package_generic_map_aspect +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ interface_package_declaration ::= @@ -16,6 +18,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("package", token.package_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/interface_package_generic_map_aspect.py b/vsg/vhdlFile/classify/interface_package_generic_map_aspect.py index 96f107712..04a5dd631 100644 --- a/vsg/vhdlFile/classify/interface_package_generic_map_aspect.py +++ b/vsg/vhdlFile/classify/interface_package_generic_map_aspect.py @@ -3,8 +3,10 @@ from vsg.token import interface_package_generic_map_aspect as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_map_aspect +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ interface_package_generic_map_aspect ::= @@ -21,6 +23,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("generic", token.generic_keyword, iToken, lObjects) iCurrent = utils.assign_next_token_required("map", token.map_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/interface_procedure_specification.py b/vsg/vhdlFile/classify/interface_procedure_specification.py index 45aa8037c..46acf3f2b 100644 --- a/vsg/vhdlFile/classify/interface_procedure_specification.py +++ b/vsg/vhdlFile/classify/interface_procedure_specification.py @@ -3,8 +3,10 @@ from vsg.token import interface_procedure_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import formal_parameter_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ interface_procedure_specification ::= @@ -16,6 +18,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("procedure", token.procedure_keyword, iToken, lObjects) iCurrent = utils.assign_next_token(token.designator, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/interface_signal_declaration.py b/vsg/vhdlFile/classify/interface_signal_declaration.py index 759c3752a..cd4308f90 100644 --- a/vsg/vhdlFile/classify/interface_signal_declaration.py +++ b/vsg/vhdlFile/classify/interface_signal_declaration.py @@ -4,8 +4,10 @@ from vsg.token import interface_signal_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, mode, subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ interface_signal_declaration ::= @@ -17,6 +19,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("signal", token.signal_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/interface_subprogram_declaration.py b/vsg/vhdlFile/classify/interface_subprogram_declaration.py index f406682c9..bbbe92328 100644 --- a/vsg/vhdlFile/classify/interface_subprogram_declaration.py +++ b/vsg/vhdlFile/classify/interface_subprogram_declaration.py @@ -6,8 +6,10 @@ interface_subprogram_default, interface_subprogram_specification, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ interface_subprogram_declaration ::= @@ -23,6 +25,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_if("is", token.is_keyword, iToken, lObjects) iCurrent = interface_subprogram_default.classify(iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/interface_subprogram_default.py b/vsg/vhdlFile/classify/interface_subprogram_default.py index b5543caac..2a3aff335 100644 --- a/vsg/vhdlFile/classify/interface_subprogram_default.py +++ b/vsg/vhdlFile/classify/interface_subprogram_default.py @@ -2,8 +2,10 @@ from vsg.token import interface_subprogram_default as token from vsg.vhdlFile import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ interface_subprogram_default ::= diff --git a/vsg/vhdlFile/classify/interface_subprogram_specification.py b/vsg/vhdlFile/classify/interface_subprogram_specification.py index 8b615a9b8..6322d5b35 100644 --- a/vsg/vhdlFile/classify/interface_subprogram_specification.py +++ b/vsg/vhdlFile/classify/interface_subprogram_specification.py @@ -4,8 +4,10 @@ interface_function_specification, interface_procedure_specification, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ interface_subprogram_specification ::= diff --git a/vsg/vhdlFile/classify/interface_type_declaration.py b/vsg/vhdlFile/classify/interface_type_declaration.py index 457740349..3d44b2d77 100644 --- a/vsg/vhdlFile/classify/interface_type_declaration.py +++ b/vsg/vhdlFile/classify/interface_type_declaration.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import interface_incomplete_type_declaration +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ interface_type_declaration ::= diff --git a/vsg/vhdlFile/classify/interface_unknown_declaration.py b/vsg/vhdlFile/classify/interface_unknown_declaration.py index f8a9b0cd9..bb6e293ee 100644 --- a/vsg/vhdlFile/classify/interface_unknown_declaration.py +++ b/vsg/vhdlFile/classify/interface_unknown_declaration.py @@ -3,8 +3,10 @@ from vsg.token import interface_unknown_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, mode, subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ This is a classification if the signal, constant, or variable keywords can not be found. @@ -21,6 +23,7 @@ def detect(iToken, lObjects): return classify(iToken, lObjects) +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = identifier_list.classify_until([":"], iToken, lObjects, token.identifier) diff --git a/vsg/vhdlFile/classify/interface_variable_declaration.py b/vsg/vhdlFile/classify/interface_variable_declaration.py index 9cb1f6e6d..c418e1ebf 100644 --- a/vsg/vhdlFile/classify/interface_variable_declaration.py +++ b/vsg/vhdlFile/classify/interface_variable_declaration.py @@ -3,8 +3,10 @@ from vsg.token import interface_variable_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, mode, subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ interface_variable_declaration ::= @@ -16,6 +18,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("variable", token.variable_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/iteration_scheme.py b/vsg/vhdlFile/classify/iteration_scheme.py index 593825ce5..b4824423a 100644 --- a/vsg/vhdlFile/classify/iteration_scheme.py +++ b/vsg/vhdlFile/classify/iteration_scheme.py @@ -3,8 +3,10 @@ from vsg.token import iteration_scheme as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import condition, parameter_specification +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ iteration_scheme ::= @@ -22,6 +24,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): if utils.is_next_token("while", iToken, lObjects): iCurrent = utils.assign_next_token_required("while", token.while_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/library_clause.py b/vsg/vhdlFile/classify/library_clause.py index c4ee9de6d..94bebc525 100644 --- a/vsg/vhdlFile/classify/library_clause.py +++ b/vsg/vhdlFile/classify/library_clause.py @@ -2,8 +2,10 @@ from vsg.token import library_clause as token from vsg.vhdlFile.classify import logical_name_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ library_clause ::= @@ -15,6 +17,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_current_token_with(token.keyword) diff --git a/vsg/vhdlFile/classify/library_unit.py b/vsg/vhdlFile/classify/library_unit.py index fcdf76785..2796d458b 100644 --- a/vsg/vhdlFile/classify/library_unit.py +++ b/vsg/vhdlFile/classify/library_unit.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import primary_unit, secondary_unit +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ library_unit ::= diff --git a/vsg/vhdlFile/classify/logical_name_list.py b/vsg/vhdlFile/classify/logical_name_list.py index 60f89edc1..a0d89aa59 100644 --- a/vsg/vhdlFile/classify/logical_name_list.py +++ b/vsg/vhdlFile/classify/logical_name_list.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.token import logical_name_list as token +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, oDataStructure): """ logical_name_list ::= diff --git a/vsg/vhdlFile/classify/loop_statement.py b/vsg/vhdlFile/classify/loop_statement.py index 3468e4c97..2d35a9dfc 100644 --- a/vsg/vhdlFile/classify/loop_statement.py +++ b/vsg/vhdlFile/classify/loop_statement.py @@ -3,8 +3,10 @@ from vsg.token import loop_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import iteration_scheme, sequence_of_statements +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ loop_statement ::= @@ -28,6 +30,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.tokenize_label(iToken, lObjects, token.loop_label, token.label_colon) diff --git a/vsg/vhdlFile/classify/mode.py b/vsg/vhdlFile/classify/mode.py index c142f6812..52f5293f0 100644 --- a/vsg/vhdlFile/classify/mode.py +++ b/vsg/vhdlFile/classify/mode.py @@ -2,8 +2,10 @@ from vsg.token import mode as token from vsg.vhdlFile import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ mode ::= diff --git a/vsg/vhdlFile/classify/name.py b/vsg/vhdlFile/classify/name.py index f7e823e58..99f322ce1 100644 --- a/vsg/vhdlFile/classify/name.py +++ b/vsg/vhdlFile/classify/name.py @@ -3,8 +3,10 @@ from vsg import parser from vsg.token import direction from vsg.vhdlFile.classify import external_name, utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, oDataStructure, oType=parser.todo): """ name ::= diff --git a/vsg/vhdlFile/classify/next_statement.py b/vsg/vhdlFile/classify/next_statement.py index 15162cb67..6e2c5ebf2 100644 --- a/vsg/vhdlFile/classify/next_statement.py +++ b/vsg/vhdlFile/classify/next_statement.py @@ -2,8 +2,10 @@ from vsg.token import next_statement as token from vsg.vhdlFile.classify import condition, utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ next_statement ::= @@ -15,6 +17,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.tokenize_label(iToken, lObjects, token.label, token.label_colon) iCurrent = utils.assign_next_token_required("next", token.next_keyword, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/null_statement.py b/vsg/vhdlFile/classify/null_statement.py index 810dfb822..9eb34a014 100644 --- a/vsg/vhdlFile/classify/null_statement.py +++ b/vsg/vhdlFile/classify/null_statement.py @@ -2,8 +2,10 @@ from vsg.token import null_statement as token from vsg.vhdlFile.classify import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ null_statement ::= @@ -15,6 +17,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.tokenize_label(iToken, lObjects, token.label, token.label_colon) iCurrent = utils.assign_next_token_required("null", token.null_keyword, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/package_body.py b/vsg/vhdlFile/classify/package_body.py index 6c5a300ce..2f77af9e5 100644 --- a/vsg/vhdlFile/classify/package_body.py +++ b/vsg/vhdlFile/classify/package_body.py @@ -3,8 +3,10 @@ from vsg.token import package_body as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import package_body_declarative_part +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ package_body ::= @@ -19,6 +21,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with(token.package_keyword) oDataStructure.replace_next_token_required("body", token.body_keyword) diff --git a/vsg/vhdlFile/classify/package_body_declarative_item.py b/vsg/vhdlFile/classify/package_body_declarative_item.py index 9184c3bb2..13993a504 100644 --- a/vsg/vhdlFile/classify/package_body_declarative_item.py +++ b/vsg/vhdlFile/classify/package_body_declarative_item.py @@ -18,8 +18,10 @@ use_clause, variable_declaration, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ package_body_declarative_item ::= diff --git a/vsg/vhdlFile/classify/package_body_declarative_part.py b/vsg/vhdlFile/classify/package_body_declarative_part.py index a515562f9..3f8c6e241 100644 --- a/vsg/vhdlFile/classify/package_body_declarative_part.py +++ b/vsg/vhdlFile/classify/package_body_declarative_part.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import package_body_declarative_item +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ package_body_declarative_part ::= diff --git a/vsg/vhdlFile/classify/package_declaration.py b/vsg/vhdlFile/classify/package_declaration.py index b47cad8d1..c2ee06121 100644 --- a/vsg/vhdlFile/classify/package_declaration.py +++ b/vsg/vhdlFile/classify/package_declaration.py @@ -2,8 +2,10 @@ from vsg.token import package_declaration as token from vsg.vhdlFile.classify import package_declarative_part, package_header +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ package_declaration ::= @@ -21,6 +23,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with(token.package_keyword) oDataStructure.replace_next_token_with(token.identifier) diff --git a/vsg/vhdlFile/classify/package_declarative_item.py b/vsg/vhdlFile/classify/package_declarative_item.py index 58f00ce4d..33444eae3 100644 --- a/vsg/vhdlFile/classify/package_declarative_item.py +++ b/vsg/vhdlFile/classify/package_declarative_item.py @@ -17,8 +17,10 @@ use_clause, variable_declaration, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ package_declarative_item ::= diff --git a/vsg/vhdlFile/classify/package_declarative_part.py b/vsg/vhdlFile/classify/package_declarative_part.py index a773fb0c8..6c9c20205 100644 --- a/vsg/vhdlFile/classify/package_declarative_part.py +++ b/vsg/vhdlFile/classify/package_declarative_part.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import package_declarative_item +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ package_declarative_part ::= diff --git a/vsg/vhdlFile/classify/package_header.py b/vsg/vhdlFile/classify/package_header.py index f10b64173..e057a4ef2 100644 --- a/vsg/vhdlFile/classify/package_header.py +++ b/vsg/vhdlFile/classify/package_header.py @@ -2,8 +2,10 @@ from vsg.token import package_header as token from vsg.vhdlFile.classify import generic_clause, generic_map_aspect +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ package_header ::= diff --git a/vsg/vhdlFile/classify/package_instantiation_declaration.py b/vsg/vhdlFile/classify/package_instantiation_declaration.py index f4162e053..41abfd425 100644 --- a/vsg/vhdlFile/classify/package_instantiation_declaration.py +++ b/vsg/vhdlFile/classify/package_instantiation_declaration.py @@ -2,8 +2,10 @@ from vsg.token import package_instantiation_declaration as token from vsg.vhdlFile.classify import generic_map_aspect, identifier +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ package_instantiation_declaration ::= @@ -16,6 +18,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_required("package", token.package_keyword) diff --git a/vsg/vhdlFile/classify/parameter_specification.py b/vsg/vhdlFile/classify/parameter_specification.py index 45cfae8b4..849b13b54 100644 --- a/vsg/vhdlFile/classify/parameter_specification.py +++ b/vsg/vhdlFile/classify/parameter_specification.py @@ -3,8 +3,10 @@ from vsg.token import parameter_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import discrete_range +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, iToken, lObjects): """ parameter_specification ::= diff --git a/vsg/vhdlFile/classify/physical_type_definition.py b/vsg/vhdlFile/classify/physical_type_definition.py index 4ce8342ef..f7834df57 100644 --- a/vsg/vhdlFile/classify/physical_type_definition.py +++ b/vsg/vhdlFile/classify/physical_type_definition.py @@ -7,8 +7,10 @@ range_constraint, secondary_unit_declaration, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ physical_type_definition ::= @@ -24,6 +26,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = range_constraint.detect(iToken, lObjects) @@ -41,6 +44,7 @@ def classify(iToken, lObjects): return iCurrent +@decorators.print_classifier_debug_info(__name__) def units_keyword_found_before_semicolon(oDataStructure): if oDataStructure.does_string_exist_before_string("units", ";"): return True diff --git a/vsg/vhdlFile/classify/port_clause.py b/vsg/vhdlFile/classify/port_clause.py index 01f5f1207..54fc2336f 100644 --- a/vsg/vhdlFile/classify/port_clause.py +++ b/vsg/vhdlFile/classify/port_clause.py @@ -3,8 +3,10 @@ from vsg.token import port_clause as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import port_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ port_clause ::= @@ -17,6 +19,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with(token.port_keyword) oDataStructure.replace_next_token_with(token.open_parenthesis) diff --git a/vsg/vhdlFile/classify/port_list.py b/vsg/vhdlFile/classify/port_list.py index 277f7860b..e773e0eb0 100644 --- a/vsg/vhdlFile/classify/port_list.py +++ b/vsg/vhdlFile/classify/port_list.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import interface_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ port_list ::= diff --git a/vsg/vhdlFile/classify/port_map_aspect.py b/vsg/vhdlFile/classify/port_map_aspect.py index f4e7f2aa8..bd5c497d9 100644 --- a/vsg/vhdlFile/classify/port_map_aspect.py +++ b/vsg/vhdlFile/classify/port_map_aspect.py @@ -3,8 +3,10 @@ from vsg.token import port_map_aspect as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import association_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ port_map_aspect ::= @@ -16,6 +18,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("port", token.port_keyword, iToken, lObjects) iCurrent = utils.assign_next_token_required("map", token.map_keyword, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/pragma.py b/vsg/vhdlFile/classify/pragma.py index 432bee216..4f9c7b7b2 100644 --- a/vsg/vhdlFile/classify/pragma.py +++ b/vsg/vhdlFile/classify/pragma.py @@ -2,8 +2,10 @@ from vsg import parser from vsg.token import pragma +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(lObjects, lOpenPragmas, lClosePragmas, dVars, configuration): """ Classifies pragmas @@ -17,6 +19,7 @@ def classify(lObjects, lOpenPragmas, lClosePragmas, dVars, configuration): set_tokens_to_ignore(lObjects, lClosePragmas, dVars) +@decorators.print_classifier_debug_info(__name__) def set_tokens_to_ignore(lObjects, lClosePragmas, dVars): for iToken, oToken in enumerate(lObjects): if not isinstance(oToken, parser.whitespace): @@ -25,14 +28,17 @@ def set_tokens_to_ignore(lObjects, lClosePragmas, dVars): dVars["pragma"] = False +@decorators.print_classifier_debug_info(__name__) def inside_vhdloff_vhdlon_region(dVars): return dVars["pragma"] +@decorators.print_classifier_debug_info(__name__) def line_starts_with_comment(lObjects): return first_token_is_a_comment(lObjects) or second_token_is_a_comment(lObjects) +@decorators.print_classifier_debug_info(__name__) def check_for_open_pragmas(lObjects, dVars, lOpenPragmas): for oToken in lObjects: sToken = oToken.get_value() @@ -40,6 +46,7 @@ def check_for_open_pragmas(lObjects, dVars, lOpenPragmas): dVars["pragma"] = True +@decorators.print_classifier_debug_info(__name__) def first_token_is_a_comment(lObjects): try: return token_is_a_comment(lObjects[0]) @@ -47,6 +54,7 @@ def first_token_is_a_comment(lObjects): return False +@decorators.print_classifier_debug_info(__name__) def second_token_is_a_comment(lObjects): try: return token_is_a_comment(lObjects[1]) @@ -54,12 +62,14 @@ def second_token_is_a_comment(lObjects): return False +@decorators.print_classifier_debug_info(__name__) def token_is_a_comment(oToken): if oToken.get_value().startswith("--"): return True return False +@decorators.print_classifier_debug_info(__name__) def classify_pragmas(lObjects, dVars, configuration): if classify_open_pragmas(lObjects, dVars, configuration): return True @@ -70,6 +80,7 @@ def classify_pragmas(lObjects, dVars, configuration): return False +@decorators.print_classifier_debug_info(__name__) def classify_open_pragmas(lObjects, dVars, configuration): for regex in configuration.dConfig["pragma"]["regexp"]["open"]: if regex.match(dVars["line"]): @@ -80,6 +91,7 @@ def classify_open_pragmas(lObjects, dVars, configuration): return False +@decorators.print_classifier_debug_info(__name__) def classify_close_pragmas(lObjects, dVars, configuration): for regex in configuration.dConfig["pragma"]["regexp"]["close"]: if regex.match(dVars["line"]): @@ -90,6 +102,7 @@ def classify_close_pragmas(lObjects, dVars, configuration): return False +@decorators.print_classifier_debug_info(__name__) def classify_single_pragmas(lObjects, dVars, configuration): for regex in configuration.dConfig["pragma"]["regexp"]["single"]: if classify_pragma(lObjects, dVars, regex, pragma.single): @@ -97,6 +110,7 @@ def classify_single_pragmas(lObjects, dVars, configuration): return False +@decorators.print_classifier_debug_info(__name__) def classify_pragma(lObjects, dVars, regex, oType): if regex.match(dVars["line"]): for iToken, oToken in enumerate(lObjects): diff --git a/vsg/vhdlFile/classify/prefix.py b/vsg/vhdlFile/classify/prefix.py index a5f83926d..c0b835172 100644 --- a/vsg/vhdlFile/classify/prefix.py +++ b/vsg/vhdlFile/classify/prefix.py @@ -2,8 +2,10 @@ from vsg import parser from vsg.vhdlFile.classify import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure, oToken): oDataStructure.replace_next_token_with(oToken.name) diff --git a/vsg/vhdlFile/classify/preprocessor.py b/vsg/vhdlFile/classify/preprocessor.py index d9070f42f..10c3fad5c 100644 --- a/vsg/vhdlFile/classify/preprocessor.py +++ b/vsg/vhdlFile/classify/preprocessor.py @@ -2,8 +2,10 @@ from vsg import parser +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(lTokens, lObjects): """ Classifies preprocessor commands diff --git a/vsg/vhdlFile/classify/primary_unit.py b/vsg/vhdlFile/classify/primary_unit.py index 1b0d10a00..38747c0cb 100644 --- a/vsg/vhdlFile/classify/primary_unit.py +++ b/vsg/vhdlFile/classify/primary_unit.py @@ -7,8 +7,10 @@ package_declaration, package_instantiation_declaration, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ primary_unit ::= diff --git a/vsg/vhdlFile/classify/primary_unit_declaration.py b/vsg/vhdlFile/classify/primary_unit_declaration.py index 853fe5913..4c83d5ba0 100644 --- a/vsg/vhdlFile/classify/primary_unit_declaration.py +++ b/vsg/vhdlFile/classify/primary_unit_declaration.py @@ -2,8 +2,10 @@ from vsg.token import primary_unit_declaration as token from vsg.vhdlFile import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ primary_unit_declaration ::= identifier; @@ -11,6 +13,7 @@ def detect(iToken, lObjects): return classify(iToken, lObjects) +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = iToken diff --git a/vsg/vhdlFile/classify/procedure_call.py b/vsg/vhdlFile/classify/procedure_call.py index d9547aeed..76ecf0015 100644 --- a/vsg/vhdlFile/classify/procedure_call.py +++ b/vsg/vhdlFile/classify/procedure_call.py @@ -3,10 +3,12 @@ from vsg.token import procedure_call as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import actual_parameter_part +from vsg import decorators lExceptions = ["<=", "end", "map", "component", "entity", "configuration", "if"] +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ Calling functions: @@ -34,6 +36,7 @@ def detect(oDataStructure): return True +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): """ procedure_call ::= diff --git a/vsg/vhdlFile/classify/procedure_call_statement.py b/vsg/vhdlFile/classify/procedure_call_statement.py index 979a12cc4..f9b18ff89 100644 --- a/vsg/vhdlFile/classify/procedure_call_statement.py +++ b/vsg/vhdlFile/classify/procedure_call_statement.py @@ -3,10 +3,12 @@ from vsg.token import procedure_call_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import procedure_call +from vsg import decorators lKeywords = ["null", "return", "exit", "next", "while", "for", "loop", "case", "if", "report", "assert", "wait", "end", "with", "else", "elsif", "when"] +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ procedure_call_statement ::= @@ -40,6 +42,7 @@ def detect(oDataStructure): # return classify(iToken, lObjects) +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.tokenize_label(iToken, lObjects, token.label, token.label_colon) diff --git a/vsg/vhdlFile/classify/procedure_specification.py b/vsg/vhdlFile/classify/procedure_specification.py index 1a658f4a4..d27725a19 100644 --- a/vsg/vhdlFile/classify/procedure_specification.py +++ b/vsg/vhdlFile/classify/procedure_specification.py @@ -3,8 +3,10 @@ from vsg.token import procedure_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import formal_parameter_list, subprogram_header +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ procedure_specification ::= @@ -20,6 +22,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("procedure", token.procedure_keyword, iToken, lObjects) iCurrent = utils.assign_next_token(token.designator, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/process_declarative_item.py b/vsg/vhdlFile/classify/process_declarative_item.py index f9e2d3b65..530696980 100644 --- a/vsg/vhdlFile/classify/process_declarative_item.py +++ b/vsg/vhdlFile/classify/process_declarative_item.py @@ -17,8 +17,10 @@ use_clause, variable_declaration, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ process_declarative_item ::= diff --git a/vsg/vhdlFile/classify/process_declarative_part.py b/vsg/vhdlFile/classify/process_declarative_part.py index 6a923e030..c6794f917 100644 --- a/vsg/vhdlFile/classify/process_declarative_part.py +++ b/vsg/vhdlFile/classify/process_declarative_part.py @@ -2,8 +2,10 @@ from vsg.vhdlFile.classify import process_declarative_item +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ process_declarative_part ::= diff --git a/vsg/vhdlFile/classify/process_sensitivity_list.py b/vsg/vhdlFile/classify/process_sensitivity_list.py index a5dcfbd76..903ebb394 100644 --- a/vsg/vhdlFile/classify/process_sensitivity_list.py +++ b/vsg/vhdlFile/classify/process_sensitivity_list.py @@ -2,8 +2,10 @@ from vsg.token import process_sensitivity_list as token from vsg.vhdlFile.classify import sensitivity_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): """ process_sensitivity_list ::= diff --git a/vsg/vhdlFile/classify/process_statement.py b/vsg/vhdlFile/classify/process_statement.py index 11cbdf384..be40a4dd2 100644 --- a/vsg/vhdlFile/classify/process_statement.py +++ b/vsg/vhdlFile/classify/process_statement.py @@ -7,8 +7,10 @@ process_statement_part, utils, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ process_statement ::= @@ -26,6 +28,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): classify_opening_declaration(oDataStructure) @@ -38,6 +41,7 @@ def classify(oDataStructure): classify_closing_declaration(oDataStructure) +@decorators.print_classifier_debug_info(__name__) def classify_opening_declaration(oDataStructure): utils.tokenize_label(oDataStructure, token.process_label, token.label_colon) oDataStructure.replace_next_token_with_if("postponed", token.postponed_keyword) @@ -51,6 +55,7 @@ def classify_opening_declaration(oDataStructure): oDataStructure.replace_next_token_with_if("is", token.is_keyword) +@decorators.print_classifier_debug_info(__name__) def classify_closing_declaration(oDataStructure): oDataStructure.replace_next_token_required("end", token.end_keyword) oDataStructure.replace_next_token_with_if("postponed", token.end_postponed_keyword) diff --git a/vsg/vhdlFile/classify/process_statement_part.py b/vsg/vhdlFile/classify/process_statement_part.py index be2edec69..5627f1d51 100644 --- a/vsg/vhdlFile/classify/process_statement_part.py +++ b/vsg/vhdlFile/classify/process_statement_part.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import sequential_statement +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ process_statement_part ::= diff --git a/vsg/vhdlFile/classify/protected_type_body.py b/vsg/vhdlFile/classify/protected_type_body.py index c553ee37b..0d4884781 100644 --- a/vsg/vhdlFile/classify/protected_type_body.py +++ b/vsg/vhdlFile/classify/protected_type_body.py @@ -3,8 +3,10 @@ from vsg.token import protected_type_body as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import protected_type_body_declarative_part +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ protected_type_body ::= @@ -18,6 +20,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("protected", token.protected_keyword, iToken, lObjects) iCurrent = utils.assign_next_token_required("body", token.body_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/protected_type_body_declarative_item.py b/vsg/vhdlFile/classify/protected_type_body_declarative_item.py index d19a20bd9..3b98c2e7a 100644 --- a/vsg/vhdlFile/classify/protected_type_body_declarative_item.py +++ b/vsg/vhdlFile/classify/protected_type_body_declarative_item.py @@ -17,8 +17,10 @@ use_clause, variable_declaration, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ protected_type_body_declarative_item ::= diff --git a/vsg/vhdlFile/classify/protected_type_body_declarative_part.py b/vsg/vhdlFile/classify/protected_type_body_declarative_part.py index 04f8a45e9..751bb878c 100644 --- a/vsg/vhdlFile/classify/protected_type_body_declarative_part.py +++ b/vsg/vhdlFile/classify/protected_type_body_declarative_part.py @@ -2,8 +2,10 @@ from vsg.vhdlFile import utils from vsg.vhdlFile.classify import protected_type_body_declarative_item +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ protected_type_body_declarative_part ::= diff --git a/vsg/vhdlFile/classify/protected_type_declaration.py b/vsg/vhdlFile/classify/protected_type_declaration.py index 5f0a360b9..30f7b89d6 100644 --- a/vsg/vhdlFile/classify/protected_type_declaration.py +++ b/vsg/vhdlFile/classify/protected_type_declaration.py @@ -3,8 +3,10 @@ from vsg.token import protected_type_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import protected_type_declarative_part +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ protected_type_declaration ::= @@ -19,6 +21,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("protected", token.protected_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/protected_type_declarative_item.py b/vsg/vhdlFile/classify/protected_type_declarative_item.py index 2f2a16196..8b045516a 100644 --- a/vsg/vhdlFile/classify/protected_type_declarative_item.py +++ b/vsg/vhdlFile/classify/protected_type_declarative_item.py @@ -7,8 +7,10 @@ subprogram_instantiation_declaration, use_clause, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ protected_type_declarative_item ::= diff --git a/vsg/vhdlFile/classify/protected_type_declarative_part.py b/vsg/vhdlFile/classify/protected_type_declarative_part.py index c90a8d6bf..693e56d72 100644 --- a/vsg/vhdlFile/classify/protected_type_declarative_part.py +++ b/vsg/vhdlFile/classify/protected_type_declarative_part.py @@ -2,8 +2,10 @@ from vsg.vhdlFile import utils from vsg.vhdlFile.classify import protected_type_declarative_item +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ protected_type_declarative_part ::= diff --git a/vsg/vhdlFile/classify/protected_type_definition.py b/vsg/vhdlFile/classify/protected_type_definition.py index 06d0fe7f5..4234aae5f 100644 --- a/vsg/vhdlFile/classify/protected_type_definition.py +++ b/vsg/vhdlFile/classify/protected_type_definition.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import protected_type_body, protected_type_declaration +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ protected_type_definition ::= diff --git a/vsg/vhdlFile/classify/range.py b/vsg/vhdlFile/classify/range.py index 48d9cdd52..51038a6c2 100644 --- a/vsg/vhdlFile/classify/range.py +++ b/vsg/vhdlFile/classify/range.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import attribute_name +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ range ::= @@ -14,6 +16,7 @@ def detect(oDataStructure): return detect_direction(oDataStructure) +@decorators.print_classifier_debug_info(__name__) def detect_direction(oDataStructure): if oDataStructure.does_string_exist_before_matching_close_parenthesis("downto"): return True diff --git a/vsg/vhdlFile/classify/range_constraint.py b/vsg/vhdlFile/classify/range_constraint.py index b02fd6ec7..40b9c7052 100644 --- a/vsg/vhdlFile/classify/range_constraint.py +++ b/vsg/vhdlFile/classify/range_constraint.py @@ -3,8 +3,10 @@ from vsg import parser from vsg.token import range_constraint as token from vsg.vhdlFile.classify import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ range_constraint ::= @@ -16,6 +18,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with(token.range_keyword) diff --git a/vsg/vhdlFile/classify/record_constraint.py b/vsg/vhdlFile/classify/record_constraint.py index 101ed07c1..d91519c58 100644 --- a/vsg/vhdlFile/classify/record_constraint.py +++ b/vsg/vhdlFile/classify/record_constraint.py @@ -3,8 +3,10 @@ from vsg.token import record_constraint as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import record_element_constraint +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ record_constraint ::= @@ -19,6 +21,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/record_element_constraint.py b/vsg/vhdlFile/classify/record_element_constraint.py index 2db17b427..33d3fb874 100644 --- a/vsg/vhdlFile/classify/record_element_constraint.py +++ b/vsg/vhdlFile/classify/record_element_constraint.py @@ -3,8 +3,10 @@ from vsg.token import record_element_constraint as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import element_constraint +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ record_element_constraint ::= @@ -17,6 +19,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token(token.record_element_simple_name, iToken, lObjects) iCurrent = element_constraint.detect(iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/record_type_definition.py b/vsg/vhdlFile/classify/record_type_definition.py index 62c2f3803..e3d22afe6 100644 --- a/vsg/vhdlFile/classify/record_type_definition.py +++ b/vsg/vhdlFile/classify/record_type_definition.py @@ -3,8 +3,10 @@ from vsg.token import record_type_definition as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import element_declaration +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ record_type_definition ::= @@ -20,6 +22,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("record", token.record_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/report_statement.py b/vsg/vhdlFile/classify/report_statement.py index 2c0fecf56..43d1bdc9e 100644 --- a/vsg/vhdlFile/classify/report_statement.py +++ b/vsg/vhdlFile/classify/report_statement.py @@ -2,8 +2,10 @@ from vsg.token import report_statement as token from vsg.vhdlFile.classify import expression, utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ report_statement ::= @@ -18,6 +20,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.tokenize_label(iToken, lObjects, token.label, token.label_colon) iCurrent = utils.assign_next_token_required("report", token.report_keyword, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/resolution_indication.py b/vsg/vhdlFile/classify/resolution_indication.py index 8946e50aa..080f2febd 100644 --- a/vsg/vhdlFile/classify/resolution_indication.py +++ b/vsg/vhdlFile/classify/resolution_indication.py @@ -3,8 +3,10 @@ from vsg import parser from vsg.token import resolution_indication as token from vsg.vhdlFile import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ resolution_indication ::= @@ -21,6 +23,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify_element_resolution(iToken, lObjects): iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iToken, lObjects) iCurrent = utils.assign_tokens_until_matching_closing_paren(parser.todo, iCurrent, lObjects) @@ -29,16 +32,19 @@ def classify_element_resolution(iToken, lObjects): return iCurrent +@decorators.print_classifier_debug_info(__name__) def classify_resolution_function_name(iToken, lObjects): return utils.assign_next_token(token.resolution_function_name, iToken, lObjects) +@decorators.print_classifier_debug_info(__name__) def detect_element_resolution(oDataStructure): if oDataStructure.is_next_seek_token("("): return True return False +@decorators.print_classifier_debug_info(__name__) def detect_resolution_function_name(oDataStructure): return not detect_escape_value(oDataStructure) @@ -46,6 +52,7 @@ def detect_resolution_function_name(oDataStructure): lEscapeValues = ["(", ")", ";", ":=", "range", "bus", "is", "open", "'", ">>"] +@decorators.print_classifier_debug_info(__name__) def detect_escape_value(oDataStructure): oDataStructure.increment_seek_index() return oDataStructure.is_next_seek_token_one_of(lEscapeValues) diff --git a/vsg/vhdlFile/classify/return_statement.py b/vsg/vhdlFile/classify/return_statement.py index 4ec9e0c83..a38aa6fa8 100644 --- a/vsg/vhdlFile/classify/return_statement.py +++ b/vsg/vhdlFile/classify/return_statement.py @@ -2,8 +2,10 @@ from vsg.token import return_statement as token from vsg.vhdlFile.classify import expression, utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ return_statement ::= @@ -16,6 +18,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.tokenize_label(iToken, lObjects, token.label, token.label_colon) iCurrent = utils.assign_next_token_required("return", token.return_keyword, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/scalar_type_definition.py b/vsg/vhdlFile/classify/scalar_type_definition.py index 8cc033b54..246caf038 100644 --- a/vsg/vhdlFile/classify/scalar_type_definition.py +++ b/vsg/vhdlFile/classify/scalar_type_definition.py @@ -5,8 +5,10 @@ integer_type_definition, physical_type_definition, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ scalar_type_definition ::= diff --git a/vsg/vhdlFile/classify/secondary_unit.py b/vsg/vhdlFile/classify/secondary_unit.py index 17551b261..d17b62f4e 100644 --- a/vsg/vhdlFile/classify/secondary_unit.py +++ b/vsg/vhdlFile/classify/secondary_unit.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import architecture_body, package_body +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ secondary_unit ::= diff --git a/vsg/vhdlFile/classify/secondary_unit_declaration.py b/vsg/vhdlFile/classify/secondary_unit_declaration.py index 740676ac6..863c5b9da 100644 --- a/vsg/vhdlFile/classify/secondary_unit_declaration.py +++ b/vsg/vhdlFile/classify/secondary_unit_declaration.py @@ -2,8 +2,10 @@ from vsg.token import secondary_unit_declaration as token from vsg.vhdlFile import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ secondary_unit_declaration ::= identifier = physical_literal; @@ -13,6 +15,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = iToken iCurrent = utils.assign_next_token(token.identifier, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/selected_expressions.py b/vsg/vhdlFile/classify/selected_expressions.py index 2cfce369c..7f9a2e7a9 100644 --- a/vsg/vhdlFile/classify/selected_expressions.py +++ b/vsg/vhdlFile/classify/selected_expressions.py @@ -3,8 +3,10 @@ from vsg.token import selected_expressions as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import choices, expression +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, iToken, lObjects): """ selected_expressions ::= diff --git a/vsg/vhdlFile/classify/selected_force_assignment.py b/vsg/vhdlFile/classify/selected_force_assignment.py index b5f941b61..7e043480d 100644 --- a/vsg/vhdlFile/classify/selected_force_assignment.py +++ b/vsg/vhdlFile/classify/selected_force_assignment.py @@ -3,8 +3,10 @@ from vsg.token import selected_force_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, force_mode, selected_expressions +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ selected_force_assignment ::= [§ 10.5.4] @@ -20,6 +22,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("with", token.with_keyword, iToken, lObjects) iCurrent = expression.classify_until(["select"], iToken, lObjects) diff --git a/vsg/vhdlFile/classify/selected_signal_assignment.py b/vsg/vhdlFile/classify/selected_signal_assignment.py index e146a7c6e..20ca25f54 100644 --- a/vsg/vhdlFile/classify/selected_signal_assignment.py +++ b/vsg/vhdlFile/classify/selected_signal_assignment.py @@ -5,8 +5,10 @@ selected_force_assignment, selected_waveform_assignment, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ selected_signal_assignment ::= @@ -22,6 +24,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = selected_waveform_assignment.detect(iToken, lObjects) if iCurrent != iToken: diff --git a/vsg/vhdlFile/classify/selected_variable_assignment.py b/vsg/vhdlFile/classify/selected_variable_assignment.py index 3839cf3f0..0acc738ad 100644 --- a/vsg/vhdlFile/classify/selected_variable_assignment.py +++ b/vsg/vhdlFile/classify/selected_variable_assignment.py @@ -3,8 +3,10 @@ from vsg.token import selected_variable_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, selected_expressions +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ selected_variable_assignment ::= @@ -20,6 +22,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("with", token.with_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/selected_waveform_assignment.py b/vsg/vhdlFile/classify/selected_waveform_assignment.py index ef6857d8b..16caf3c1b 100644 --- a/vsg/vhdlFile/classify/selected_waveform_assignment.py +++ b/vsg/vhdlFile/classify/selected_waveform_assignment.py @@ -3,8 +3,10 @@ from vsg.token import selected_waveform_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import delay_mechanism, expression, selected_waveforms +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ selected_waveform_assignment ::= @@ -20,6 +22,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("with", token.with_keyword, iToken, lObjects) iCurrent = expression.classify_until(["select"], iToken, lObjects) diff --git a/vsg/vhdlFile/classify/selected_waveforms.py b/vsg/vhdlFile/classify/selected_waveforms.py index 7d4f1e08d..7d24236f5 100644 --- a/vsg/vhdlFile/classify/selected_waveforms.py +++ b/vsg/vhdlFile/classify/selected_waveforms.py @@ -4,8 +4,10 @@ from vsg.token import selected_waveforms as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import choices, waveform +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, iToken, lObjects): """ selected_waveforms ::= diff --git a/vsg/vhdlFile/classify/sensitivity_clause.py b/vsg/vhdlFile/classify/sensitivity_clause.py index c51bffe6e..d5d5a5c63 100644 --- a/vsg/vhdlFile/classify/sensitivity_clause.py +++ b/vsg/vhdlFile/classify/sensitivity_clause.py @@ -3,8 +3,10 @@ from vsg.token import sensitivity_clause as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import sensitivity_list +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ sensitivity_clause ::= @@ -16,6 +18,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, oDataStructure): oDataStructure.replace_next_token_required("on", token.on_keyword) diff --git a/vsg/vhdlFile/classify/sensitivity_list.py b/vsg/vhdlFile/classify/sensitivity_list.py index 0fe9da77d..e9e37463c 100644 --- a/vsg/vhdlFile/classify/sensitivity_list.py +++ b/vsg/vhdlFile/classify/sensitivity_list.py @@ -4,8 +4,10 @@ from vsg import parser from vsg.token import sensitivity_list as token from vsg.vhdlFile.classify import name, utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): """ sensitivity_list ::= @@ -25,6 +27,7 @@ def classify(oDataStructure): name.classify_until([","], oDataStructure) +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, oDataStructure): """ sensitivity_list ::= diff --git a/vsg/vhdlFile/classify/sequence_of_statements.py b/vsg/vhdlFile/classify/sequence_of_statements.py index c5c77360b..d060adebd 100644 --- a/vsg/vhdlFile/classify/sequence_of_statements.py +++ b/vsg/vhdlFile/classify/sequence_of_statements.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import sequential_statement +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ sequence_of_statements ::= diff --git a/vsg/vhdlFile/classify/sequential_statement.py b/vsg/vhdlFile/classify/sequential_statement.py index 8638c4efa..b40288e4c 100644 --- a/vsg/vhdlFile/classify/sequential_statement.py +++ b/vsg/vhdlFile/classify/sequential_statement.py @@ -17,8 +17,10 @@ variable_assignment_statement, wait_statement, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ sequential_statement ::= diff --git a/vsg/vhdlFile/classify/signal_assignment_statement.py b/vsg/vhdlFile/classify/signal_assignment_statement.py index 9251f2625..809e9a018 100644 --- a/vsg/vhdlFile/classify/signal_assignment_statement.py +++ b/vsg/vhdlFile/classify/signal_assignment_statement.py @@ -7,8 +7,10 @@ simple_signal_assignment, utils, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ signal_assignment_statement ::= diff --git a/vsg/vhdlFile/classify/signal_declaration.py b/vsg/vhdlFile/classify/signal_declaration.py index 35d29b471..12da83cf7 100644 --- a/vsg/vhdlFile/classify/signal_declaration.py +++ b/vsg/vhdlFile/classify/signal_declaration.py @@ -7,8 +7,10 @@ signal_kind, subtype_indication, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ signal_declaration ::= @@ -21,6 +23,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with(token.signal_keyword) diff --git a/vsg/vhdlFile/classify/signal_kind.py b/vsg/vhdlFile/classify/signal_kind.py index cf8c87403..cd0b26742 100644 --- a/vsg/vhdlFile/classify/signal_kind.py +++ b/vsg/vhdlFile/classify/signal_kind.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.token import signal_kind as token +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ signal_kind ::= @@ -15,6 +17,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with_if("register", token.register_keyword) oDataStructure.replace_next_token_with_if("bus", token.bus_keyword) diff --git a/vsg/vhdlFile/classify/signature.py b/vsg/vhdlFile/classify/signature.py index 7915d539a..481008e19 100644 --- a/vsg/vhdlFile/classify/signature.py +++ b/vsg/vhdlFile/classify/signature.py @@ -3,8 +3,10 @@ from vsg.token import signature as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import type_mark +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ signature ::= **[** [ type_mark { , type_mark } ] [ return type_mark ] **]** @@ -15,6 +17,7 @@ def detect(oDataStructure): return oDataStructure.is_next_seek_token("[") +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("[", token.open_bracket, iToken, lObjects) @@ -27,6 +30,7 @@ def classify(iToken, lObjects): return iCurrent +@decorators.print_classifier_debug_info(__name__) def detect_return(iToken, lObjects): iCurrent = iToken if utils.is_next_token("return", iCurrent, lObjects): @@ -35,6 +39,7 @@ def detect_return(iToken, lObjects): return iCurrent +@decorators.print_classifier_debug_info(__name__) def detect_type_mark(iToken, lObjects): iCurrent = iToken if not utils.is_next_token("return", iCurrent, lObjects): diff --git a/vsg/vhdlFile/classify/simple_configuration_specification.py b/vsg/vhdlFile/classify/simple_configuration_specification.py index 8ef6b190d..b16cf0620 100644 --- a/vsg/vhdlFile/classify/simple_configuration_specification.py +++ b/vsg/vhdlFile/classify/simple_configuration_specification.py @@ -3,8 +3,10 @@ from vsg.token import simple_configuration_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import binding_indication, component_specification +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ simple_configuration_specification ::= @@ -17,6 +19,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.assign_next_token_with(token.for_keyword) diff --git a/vsg/vhdlFile/classify/simple_force_assignment.py b/vsg/vhdlFile/classify/simple_force_assignment.py index 44132de8a..a5535783b 100644 --- a/vsg/vhdlFile/classify/simple_force_assignment.py +++ b/vsg/vhdlFile/classify/simple_force_assignment.py @@ -3,8 +3,10 @@ from vsg.token import simple_force_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, force_mode +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ simple_force_assignment ::= @@ -19,6 +21,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_tokens_until("<=", token.target, iToken, lObjects) iCurrent = utils.assign_next_token_required("<=", token.assignment, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/simple_release_assignment.py b/vsg/vhdlFile/classify/simple_release_assignment.py index bd2ecfdfe..7b27b8013 100644 --- a/vsg/vhdlFile/classify/simple_release_assignment.py +++ b/vsg/vhdlFile/classify/simple_release_assignment.py @@ -3,8 +3,10 @@ from vsg.token import simple_release_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import force_mode +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ simple_release_assignment ::= @@ -16,6 +18,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_tokens_until("<=", token.target, iToken, lObjects) iCurrent = utils.assign_next_token_required("<=", token.assignment, iCurrent, lObjects) diff --git a/vsg/vhdlFile/classify/simple_signal_assignment.py b/vsg/vhdlFile/classify/simple_signal_assignment.py index 324c04964..ce98ae8ec 100644 --- a/vsg/vhdlFile/classify/simple_signal_assignment.py +++ b/vsg/vhdlFile/classify/simple_signal_assignment.py @@ -6,8 +6,10 @@ simple_release_assignment, simple_waveform_assignment, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ simple_signal_assignment ::= @@ -38,6 +40,7 @@ def detect(oDataStructure): # return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = iToken iCurrent = simple_force_assignment.detect(iToken, lObjects) diff --git a/vsg/vhdlFile/classify/simple_variable_assignment.py b/vsg/vhdlFile/classify/simple_variable_assignment.py index 2ff20e57d..fdc941ca0 100644 --- a/vsg/vhdlFile/classify/simple_variable_assignment.py +++ b/vsg/vhdlFile/classify/simple_variable_assignment.py @@ -2,8 +2,10 @@ from vsg.token import simple_variable_assignment as token from vsg.vhdlFile.classify import expression, target +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ simple_variable_assignment ::= @@ -21,6 +23,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): target.classify(oDataStructure, token) oDataStructure.replace_next_token_required(":=", token.assignment) diff --git a/vsg/vhdlFile/classify/simple_waveform_assignment.py b/vsg/vhdlFile/classify/simple_waveform_assignment.py index a3f77f43e..c6649c387 100644 --- a/vsg/vhdlFile/classify/simple_waveform_assignment.py +++ b/vsg/vhdlFile/classify/simple_waveform_assignment.py @@ -3,8 +3,10 @@ from vsg.token import simple_waveform_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import delay_mechanism, waveform +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ simple_waveform_assignment ::= @@ -18,6 +20,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_tokens_until("<=", token.target, iToken, lObjects) iCurrent = utils.assign_next_token_required("<=", token.assignment, iCurrent, lObjects) @@ -31,6 +34,7 @@ def classify(iToken, lObjects): return iCurrent +@decorators.print_classifier_debug_info(__name__) def is_a_simple_waveform_assignment(iToken, lObjects): if utils.assignment_operator_found(iToken, lObjects): if force_or_release_keyword_found(iToken, lObjects): @@ -39,6 +43,7 @@ def is_a_simple_waveform_assignment(iToken, lObjects): return False +@decorators.print_classifier_debug_info(__name__) def force_or_release_keyword_found(iToken, lObjects): if utils.find_in_range("force", iToken, ";", lObjects): return True diff --git a/vsg/vhdlFile/classify/subprogram_body.py b/vsg/vhdlFile/classify/subprogram_body.py index 9755ce77f..81fab6c65 100644 --- a/vsg/vhdlFile/classify/subprogram_body.py +++ b/vsg/vhdlFile/classify/subprogram_body.py @@ -7,8 +7,10 @@ subprogram_kind, subprogram_statement_part, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ subprogram_body ::= @@ -25,6 +27,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("is", token.is_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/subprogram_declaration.py b/vsg/vhdlFile/classify/subprogram_declaration.py index c866f309c..3f9dbec64 100644 --- a/vsg/vhdlFile/classify/subprogram_declaration.py +++ b/vsg/vhdlFile/classify/subprogram_declaration.py @@ -3,8 +3,10 @@ from vsg.token import subprogram_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import subprogram_specification +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ subprogram_declaration ::= diff --git a/vsg/vhdlFile/classify/subprogram_declarative_item.py b/vsg/vhdlFile/classify/subprogram_declarative_item.py index a896bdbdc..ada66560f 100644 --- a/vsg/vhdlFile/classify/subprogram_declarative_item.py +++ b/vsg/vhdlFile/classify/subprogram_declarative_item.py @@ -17,8 +17,10 @@ use_clause, variable_declaration, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ subprogram_declarative_item ::= diff --git a/vsg/vhdlFile/classify/subprogram_declarative_part.py b/vsg/vhdlFile/classify/subprogram_declarative_part.py index ddcbba430..3e0621d43 100644 --- a/vsg/vhdlFile/classify/subprogram_declarative_part.py +++ b/vsg/vhdlFile/classify/subprogram_declarative_part.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import subprogram_declarative_item +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ subprogram_declarative_part ::= diff --git a/vsg/vhdlFile/classify/subprogram_header.py b/vsg/vhdlFile/classify/subprogram_header.py index 3fdd581f8..07afcbf52 100644 --- a/vsg/vhdlFile/classify/subprogram_header.py +++ b/vsg/vhdlFile/classify/subprogram_header.py @@ -3,8 +3,10 @@ from vsg.token import subprogram_header as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_list, generic_map_aspect +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ subprogram_header ::= @@ -17,6 +19,7 @@ def detect(iToken, lObjects): return iToken +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): if utils.find_in_next_n_tokens("(", 2, iToken, lObjects): iCurrent = utils.assign_next_token_required("generic", token.generic_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py b/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py index 65b0e6d6f..215235f7e 100644 --- a/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py +++ b/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py @@ -3,8 +3,10 @@ from vsg.token import subprogram_instantiation_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_map_aspect, signature, subprogram_kind +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ subprogram_instantiation_declaration ::= @@ -20,6 +22,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = subprogram_kind.classify(iToken, lObjects) diff --git a/vsg/vhdlFile/classify/subprogram_kind.py b/vsg/vhdlFile/classify/subprogram_kind.py index 619eeed56..b8cbf2ed4 100644 --- a/vsg/vhdlFile/classify/subprogram_kind.py +++ b/vsg/vhdlFile/classify/subprogram_kind.py @@ -2,8 +2,10 @@ from vsg.token import subprogram_kind as token from vsg.vhdlFile import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ subprogram_kind ::= @@ -17,6 +19,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_if("procedure", token.procedure_keyword) oDataStructure.replace_next_token_if("function", token.function_keyword) diff --git a/vsg/vhdlFile/classify/subprogram_specification.py b/vsg/vhdlFile/classify/subprogram_specification.py index bb9dfa017..045bfdb27 100644 --- a/vsg/vhdlFile/classify/subprogram_specification.py +++ b/vsg/vhdlFile/classify/subprogram_specification.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import function_specification, procedure_specification +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ subprogram_specification ::= diff --git a/vsg/vhdlFile/classify/subprogram_statement_part.py b/vsg/vhdlFile/classify/subprogram_statement_part.py index c168c4f57..bf4a1483b 100644 --- a/vsg/vhdlFile/classify/subprogram_statement_part.py +++ b/vsg/vhdlFile/classify/subprogram_statement_part.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import sequential_statement +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(iToken, lObjects): """ subprogram_statement_part ::= diff --git a/vsg/vhdlFile/classify/subtype_declaration.py b/vsg/vhdlFile/classify/subtype_declaration.py index 45ea29f76..8041ea9da 100644 --- a/vsg/vhdlFile/classify/subtype_declaration.py +++ b/vsg/vhdlFile/classify/subtype_declaration.py @@ -3,8 +3,10 @@ from vsg.token import subtype_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier, subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ subtype_declaration ::= @@ -17,6 +19,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(iToken, lObjects): iCurrent = utils.assign_next_token_required("subtype", token.subtype_keyword, iToken, lObjects) diff --git a/vsg/vhdlFile/classify/subtype_indication.py b/vsg/vhdlFile/classify/subtype_indication.py index e43613ec2..186aba212 100644 --- a/vsg/vhdlFile/classify/subtype_indication.py +++ b/vsg/vhdlFile/classify/subtype_indication.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import constraint, resolution_indication, type_mark +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): """ subtype_indication ::= diff --git a/vsg/vhdlFile/classify/target.py b/vsg/vhdlFile/classify/target.py index 7fc008366..f36755141 100644 --- a/vsg/vhdlFile/classify/target.py +++ b/vsg/vhdlFile/classify/target.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- from vsg.vhdlFile.classify import aggregate, utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure, oTokenClass): """ target ::= diff --git a/vsg/vhdlFile/classify/timeout_clause.py b/vsg/vhdlFile/classify/timeout_clause.py index d918d981c..0ef6bfdc1 100644 --- a/vsg/vhdlFile/classify/timeout_clause.py +++ b/vsg/vhdlFile/classify/timeout_clause.py @@ -2,8 +2,10 @@ from vsg.token import timeout_clause as token from vsg.vhdlFile.classify import expression +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ timeout_clause ::= @@ -15,6 +17,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, oDataStructure): oDataStructure.replace_next_token_with(token.for_keyword) diff --git a/vsg/vhdlFile/classify/type_declaration.py b/vsg/vhdlFile/classify/type_declaration.py index 5051c1d4b..d549f078a 100644 --- a/vsg/vhdlFile/classify/type_declaration.py +++ b/vsg/vhdlFile/classify/type_declaration.py @@ -2,8 +2,10 @@ from vsg.vhdlFile.classify import full_type_declaration, incomplete_type_declaration +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ type_declaration ::= diff --git a/vsg/vhdlFile/classify/type_definition.py b/vsg/vhdlFile/classify/type_definition.py index 1ba5d3ed2..e4f684932 100644 --- a/vsg/vhdlFile/classify/type_definition.py +++ b/vsg/vhdlFile/classify/type_definition.py @@ -7,8 +7,10 @@ protected_type_definition, scalar_type_definition, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ type_definition ::= diff --git a/vsg/vhdlFile/classify/type_mark.py b/vsg/vhdlFile/classify/type_mark.py index a1cfc613a..a5cd3f5d7 100644 --- a/vsg/vhdlFile/classify/type_mark.py +++ b/vsg/vhdlFile/classify/type_mark.py @@ -2,8 +2,10 @@ from vsg.token import type_mark as token from vsg.vhdlFile.classify import attribute_name +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): """ type_mark ::= diff --git a/vsg/vhdlFile/classify/unbounded_array_definition.py b/vsg/vhdlFile/classify/unbounded_array_definition.py index 59108086c..5bdc4dfd6 100644 --- a/vsg/vhdlFile/classify/unbounded_array_definition.py +++ b/vsg/vhdlFile/classify/unbounded_array_definition.py @@ -2,8 +2,10 @@ from vsg.token import unbounded_array_definition as token from vsg.vhdlFile.classify import index_subtype_definition, subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ unbounded_array_definition ::= @@ -18,6 +20,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with(token.array_keyword) oDataStructure.replace_next_token_required("(", token.open_parenthesis) diff --git a/vsg/vhdlFile/classify/use_clause.py b/vsg/vhdlFile/classify/use_clause.py index 806afb103..b4a5d77b7 100644 --- a/vsg/vhdlFile/classify/use_clause.py +++ b/vsg/vhdlFile/classify/use_clause.py @@ -2,8 +2,10 @@ from vsg.token import use_clause as token from vsg.vhdlFile.classify import utils +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ use_clause ::= @@ -15,6 +17,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_current_token_with(token.keyword) diff --git a/vsg/vhdlFile/classify/variable_assignment_statement.py b/vsg/vhdlFile/classify/variable_assignment_statement.py index eb6710dc5..e866fea52 100644 --- a/vsg/vhdlFile/classify/variable_assignment_statement.py +++ b/vsg/vhdlFile/classify/variable_assignment_statement.py @@ -7,8 +7,10 @@ simple_variable_assignment, utils, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ variable_assignment_statement ::= diff --git a/vsg/vhdlFile/classify/variable_declaration.py b/vsg/vhdlFile/classify/variable_declaration.py index aa1575a31..629a0976a 100644 --- a/vsg/vhdlFile/classify/variable_declaration.py +++ b/vsg/vhdlFile/classify/variable_declaration.py @@ -3,8 +3,10 @@ from vsg.token import variable_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, subtype_indication +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ variable_declaration ::= @@ -17,6 +19,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): oDataStructure.replace_next_token_with_if("shared", token.shared_keyword) oDataStructure.replace_next_token_required("variable", token.variable_keyword) diff --git a/vsg/vhdlFile/classify/wait_statement.py b/vsg/vhdlFile/classify/wait_statement.py index 3a520d6e0..411c58812 100644 --- a/vsg/vhdlFile/classify/wait_statement.py +++ b/vsg/vhdlFile/classify/wait_statement.py @@ -7,8 +7,10 @@ timeout_clause, utils, ) +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ wait_statement ::= @@ -20,6 +22,7 @@ def detect(oDataStructure): return False +@decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): utils.tokenize_label(oDataStructure, token.label, token.label_colon) oDataStructure.replace_next_token_with(token.wait_keyword) diff --git a/vsg/vhdlFile/classify/waveform.py b/vsg/vhdlFile/classify/waveform.py index 159256298..640d0a23c 100644 --- a/vsg/vhdlFile/classify/waveform.py +++ b/vsg/vhdlFile/classify/waveform.py @@ -3,8 +3,10 @@ from vsg import parser from vsg.token import waveform as token from vsg.vhdlFile.classify import waveform_element +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, oDataStructure): """ waveform ::= diff --git a/vsg/vhdlFile/classify/waveform_element.py b/vsg/vhdlFile/classify/waveform_element.py index 00e60f816..2ff906c81 100644 --- a/vsg/vhdlFile/classify/waveform_element.py +++ b/vsg/vhdlFile/classify/waveform_element.py @@ -2,8 +2,10 @@ from vsg.token import waveform_element as token from vsg.vhdlFile.classify import expression +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, oDataStructure): """ waveform_element ::= diff --git a/vsg/vhdlFile/classify/whitespace.py b/vsg/vhdlFile/classify/whitespace.py index f8b3c4afd..ba2f63200 100644 --- a/vsg/vhdlFile/classify/whitespace.py +++ b/vsg/vhdlFile/classify/whitespace.py @@ -2,8 +2,10 @@ from vsg import parser +from vsg import decorators +@decorators.print_classifier_debug_info(__name__) def classify(lTokens, lObjects): """ Classifies whitespace objects. @@ -23,24 +25,28 @@ def classify(lTokens, lObjects): lObjects[iToken].has_tab = True +@decorators.print_classifier_debug_info(__name__) def string_contains_space(sToken): if " " in sToken: return True return False +@decorators.print_classifier_debug_info(__name__) def string_contains_tab(sToken): if "\t" in sToken: return True return False +@decorators.print_classifier_debug_info(__name__) def is_string_literal(sToken): if sToken[0] == '"' and sToken[-1] == '"': return True return False +@decorators.print_classifier_debug_info(__name__) def is_character_literal(sToken): if sToken[0] == "'" and sToken[-1] == "'": return True From 50aca172940926bc2d16566e4ad9135d139d3373 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 8 Mar 2025 09:35:42 -0600 Subject: [PATCH 035/124] Renaming test names to be more generic. --- tests/after/test_rule_001.py | 2 +- tests/after/test_rule_002.py | 2 +- tests/after/test_rule_003.py | 2 +- tests/after/test_rule_500.py | 2 +- tests/alias_declaration/test_rule_001.py | 2 +- tests/alias_declaration/test_rule_100.py | 2 +- tests/alias_declaration/test_rule_101.py | 2 +- tests/alias_declaration/test_rule_102.py | 2 +- tests/alias_declaration/test_rule_103.py | 2 +- tests/alias_declaration/test_rule_300.py | 2 +- tests/alias_declaration/test_rule_500.py | 2 +- tests/alias_declaration/test_rule_501.py | 2 +- tests/alias_declaration/test_rule_502.py | 2 +- tests/alias_declaration/test_rule_600.py | 2 +- tests/alias_declaration/test_rule_601.py | 2 +- tests/architecture/test_rule_001.py | 2 +- tests/architecture/test_rule_003.py | 2 +- tests/architecture/test_rule_004.py | 2 +- tests/architecture/test_rule_005.py | 2 +- tests/architecture/test_rule_006.py | 2 +- tests/architecture/test_rule_007.py | 2 +- tests/architecture/test_rule_008.py | 2 +- tests/architecture/test_rule_009.py | 2 +- tests/architecture/test_rule_010.py | 2 +- tests/architecture/test_rule_011.py | 2 +- tests/architecture/test_rule_012.py | 2 +- tests/architecture/test_rule_013.py | 2 +- tests/architecture/test_rule_014.py | 2 +- tests/architecture/test_rule_015.py | 2 +- tests/architecture/test_rule_016.py | 2 +- tests/architecture/test_rule_017.py | 2 +- tests/architecture/test_rule_018.py | 2 +- tests/architecture/test_rule_019.py | 2 +- tests/architecture/test_rule_020.py | 2 +- tests/architecture/test_rule_021.py | 2 +- tests/architecture/test_rule_022.py | 2 +- tests/architecture/test_rule_024.py | 2 +- tests/architecture/test_rule_025.py | 2 +- tests/architecture/test_rule_027.py | 2 +- tests/architecture/test_rule_028.py | 2 +- tests/architecture/test_rule_029.py | 2 +- tests/architecture/test_rule_030.py | 2 +- tests/architecture/test_rule_031.py | 2 +- tests/architecture/test_rule_032.py | 2 +- tests/architecture/test_rule_033.py | 2 +- tests/architecture/test_rule_200.py | 2 +- tests/architecture/test_rule_400.py | 2 +- tests/architecture/test_rule_601.py | 2 +- tests/array_constraint/test_rule_500.py | 2 +- tests/assert_statement/test_rule_002.py | 2 +- tests/assert_statement/test_rule_003.py | 2 +- tests/assert_statement/test_rule_004.py | 2 +- tests/assert_statement/test_rule_005.py | 2 +- tests/assert_statement/test_rule_100.py | 2 +- tests/assert_statement/test_rule_101.py | 2 +- tests/assert_statement/test_rule_102.py | 2 +- tests/assert_statement/test_rule_400.py | 2 +- tests/assert_statement/test_rule_500.py | 2 +- tests/assert_statement/test_rule_501.py | 2 +- tests/assert_statement/test_rule_502.py | 2 +- tests/attribute/test_rule_500.py | 2 +- tests/attribute_declaration/test_rule_500.py | 2 +- tests/attribute_declaration/test_rule_501.py | 2 +- tests/attribute_declaration/test_rule_502.py | 2 +- tests/attribute_specification/test_rule_500.py | 2 +- tests/attribute_specification/test_rule_501.py | 2 +- tests/attribute_specification/test_rule_502.py | 2 +- tests/attribute_specification/test_rule_503.py | 2 +- tests/bit_string_literal/test_rule_500.py | 2 +- tests/bit_string_literal/test_rule_501.py | 2 +- tests/block/test_rule_001.py | 2 +- tests/block/test_rule_002.py | 2 +- tests/block/test_rule_003.py | 2 +- tests/block/test_rule_004.py | 2 +- tests/block/test_rule_005.py | 2 +- tests/block/test_rule_006.py | 2 +- tests/block/test_rule_007.py | 2 +- tests/block/test_rule_100.py | 2 +- tests/block/test_rule_101.py | 2 +- tests/block/test_rule_200.py | 2 +- tests/block/test_rule_201.py | 2 +- tests/block/test_rule_202.py | 2 +- tests/block/test_rule_203.py | 2 +- tests/block/test_rule_204.py | 2 +- tests/block/test_rule_205.py | 2 +- tests/block/test_rule_300.py | 2 +- tests/block/test_rule_301.py | 2 +- tests/block/test_rule_302.py | 2 +- tests/block/test_rule_400.py | 2 +- tests/block/test_rule_401.py | 2 +- tests/block/test_rule_402.py | 2 +- tests/block/test_rule_500.py | 2 +- tests/block/test_rule_501.py | 2 +- tests/block/test_rule_502.py | 2 +- tests/block/test_rule_503.py | 2 +- tests/block/test_rule_504.py | 2 +- tests/block/test_rule_505.py | 2 +- tests/block/test_rule_506.py | 2 +- tests/block/test_rule_600.py | 2 +- tests/block/test_rule_601.py | 2 +- tests/block_comment/test_rule_001.py | 2 +- tests/block_comment/test_rule_002.py | 2 +- tests/block_comment/test_rule_003.py | 2 +- tests/case/test_rule_001.py | 2 +- tests/case/test_rule_002.py | 2 +- tests/case/test_rule_003.py | 2 +- tests/case/test_rule_004.py | 2 +- tests/case/test_rule_005.py | 2 +- tests/case/test_rule_006.py | 2 +- tests/case/test_rule_007.py | 2 +- tests/case/test_rule_009.py | 2 +- tests/case/test_rule_010.py | 2 +- tests/case/test_rule_011.py | 2 +- tests/case/test_rule_012.py | 2 +- tests/case/test_rule_014.py | 2 +- tests/case/test_rule_015.py | 2 +- tests/case/test_rule_016.py | 2 +- tests/case/test_rule_017.py | 2 +- tests/case/test_rule_018.py | 2 +- tests/case/test_rule_019.py | 2 +- tests/case/test_rule_020.py | 2 +- tests/case/test_rule_200.py | 2 +- tests/case/test_rule_201.py | 2 +- tests/case/test_rule_300.py | 2 +- tests/case_generate_alternative/test_rule_500.py | 2 +- tests/case_generate_statement/test_rule_400.py | 2 +- tests/case_generate_statement/test_rule_500.py | 2 +- tests/case_generate_statement/test_rule_501.py | 2 +- tests/choice/test_rule_500.py | 2 +- tests/comment/test_rule_004.py | 2 +- tests/comment/test_rule_010.py | 2 +- tests/comment/test_rule_011.py | 2 +- tests/comment/test_rule_012.py | 2 +- tests/comment/test_rule_100.py | 2 +- tests/component/test_rule_001.py | 2 +- tests/component/test_rule_002.py | 2 +- tests/component/test_rule_003.py | 2 +- tests/component/test_rule_004.py | 2 +- tests/component/test_rule_005.py | 2 +- tests/component/test_rule_006.py | 2 +- tests/component/test_rule_007.py | 2 +- tests/component/test_rule_008.py | 2 +- tests/component/test_rule_009.py | 2 +- tests/component/test_rule_010.py | 2 +- tests/component/test_rule_011.py | 2 +- tests/component/test_rule_012.py | 2 +- tests/component/test_rule_013.py | 2 +- tests/component/test_rule_014.py | 2 +- tests/component/test_rule_016.py | 2 +- tests/component/test_rule_017.py | 2 +- tests/component/test_rule_019.py | 2 +- tests/component/test_rule_020.py | 2 +- tests/component/test_rule_021.py | 2 +- tests/concurrent/test_rule_001.py | 2 +- tests/concurrent/test_rule_002.py | 2 +- tests/concurrent/test_rule_004.py | 2 +- tests/concurrent/test_rule_005.py | 2 +- tests/concurrent/test_rule_006.py | 2 +- tests/concurrent/test_rule_006_smart_tabs.py | 2 +- tests/concurrent/test_rule_008.py | 2 +- tests/concurrent/test_rule_009.py | 2 +- tests/concurrent/test_rule_009_boolean.py | 2 +- tests/concurrent/test_rule_009_smart_tabs.py | 2 +- tests/concurrent/test_rule_010.py | 2 +- tests/concurrent/test_rule_011.py | 2 +- tests/concurrent/test_rule_012.py | 2 +- tests/concurrent/test_rule_400.py | 2 +- tests/concurrent/test_rule_401.py | 2 +- tests/conditional_expressions/test_rule_100.py | 2 +- tests/conditional_expressions/test_rule_101.py | 2 +- tests/conditional_expressions/test_rule_102.py | 2 +- tests/conditional_expressions/test_rule_103.py | 2 +- tests/conditional_expressions/test_rule_500.py | 2 +- tests/conditional_expressions/test_rule_501.py | 2 +- tests/conditional_waveforms/test_rule_100.py | 2 +- tests/conditional_waveforms/test_rule_101.py | 2 +- tests/conditional_waveforms/test_rule_102.py | 2 +- tests/conditional_waveforms/test_rule_103.py | 2 +- tests/conditional_waveforms/test_rule_500.py | 2 +- tests/conditional_waveforms/test_rule_501.py | 2 +- tests/constant/test_rule_001.py | 2 +- tests/constant/test_rule_002.py | 2 +- tests/constant/test_rule_004.py | 2 +- tests/constant/test_rule_005.py | 2 +- tests/constant/test_rule_006.py | 2 +- tests/constant/test_rule_007.py | 2 +- tests/constant/test_rule_010.py | 2 +- tests/constant/test_rule_012.py | 2 +- tests/constant/test_rule_014.py | 2 +- tests/constant/test_rule_015.py | 2 +- tests/constant/test_rule_016.py | 2 +- tests/constant/test_rule_016_boolean.py | 2 +- tests/constant/test_rule_100.py | 2 +- tests/constant/test_rule_101.py | 2 +- tests/constant/test_rule_200.py | 2 +- tests/constant/test_rule_600.py | 2 +- tests/context/test_rule_001.py | 2 +- tests/context/test_rule_002.py | 2 +- tests/context/test_rule_003.py | 2 +- tests/context/test_rule_004.py | 2 +- tests/context/test_rule_005.py | 2 +- tests/context/test_rule_006.py | 2 +- tests/context/test_rule_007.py | 2 +- tests/context/test_rule_008.py | 2 +- tests/context/test_rule_009.py | 2 +- tests/context/test_rule_010.py | 2 +- tests/context/test_rule_011.py | 2 +- tests/context/test_rule_012.py | 2 +- tests/context/test_rule_013.py | 2 +- tests/context/test_rule_014.py | 2 +- tests/context/test_rule_015.py | 2 +- tests/context/test_rule_016.py | 2 +- tests/context/test_rule_017.py | 2 +- tests/context/test_rule_018.py | 2 +- tests/context/test_rule_019.py | 2 +- tests/context/test_rule_020.py | 2 +- tests/context/test_rule_021.py | 2 +- tests/context/test_rule_022.py | 2 +- tests/context/test_rule_023.py | 2 +- tests/context/test_rule_024.py | 2 +- tests/context/test_rule_025.py | 2 +- tests/context_ref/test_rule_001.py | 2 +- tests/context_ref/test_rule_002.py | 2 +- tests/context_ref/test_rule_003.py | 2 +- tests/context_ref/test_rule_005.py | 2 +- tests/context_ref/test_rule_500.py | 2 +- tests/context_ref/test_rule_501.py | 2 +- tests/delay_mechanism/test_rule_500.py | 2 +- tests/delay_mechanism/test_rule_501.py | 2 +- tests/delay_mechanism/test_rule_502.py | 2 +- tests/element_association/test_rule_100.py | 2 +- tests/element_association/test_rule_101.py | 2 +- tests/entity/test_rule_001.py | 2 +- tests/entity/test_rule_002.py | 2 +- tests/entity/test_rule_003.py | 2 +- tests/entity/test_rule_004.py | 2 +- tests/entity/test_rule_005.py | 2 +- tests/entity/test_rule_006.py | 2 +- tests/entity/test_rule_007.py | 2 +- tests/entity/test_rule_008.py | 2 +- tests/entity/test_rule_009.py | 2 +- tests/entity/test_rule_010.py | 2 +- tests/entity/test_rule_011.py | 2 +- tests/entity/test_rule_012.py | 2 +- tests/entity/test_rule_013.py | 2 +- tests/entity/test_rule_014.py | 2 +- tests/entity/test_rule_015.py | 2 +- tests/entity/test_rule_016.py | 2 +- tests/entity/test_rule_017.py | 2 +- tests/entity/test_rule_018.py | 2 +- tests/entity/test_rule_019.py | 2 +- tests/entity/test_rule_020.py | 2 +- tests/entity/test_rule_021.py | 2 +- tests/entity/test_rule_022.py | 2 +- tests/entity/test_rule_023.py | 2 +- tests/entity/test_rule_024.py | 2 +- tests/entity/test_rule_025.py | 2 +- tests/entity/test_rule_026.py | 2 +- tests/entity/test_rule_027.py | 2 +- tests/entity/test_rule_028.py | 2 +- tests/entity/test_rule_029.py | 2 +- tests/entity/test_rule_200.py | 2 +- tests/entity/test_rule_201.py | 2 +- tests/entity/test_rule_202.py | 2 +- tests/entity/test_rule_203.py | 2 +- tests/entity/test_rule_300.py | 2 +- tests/entity/test_rule_500.py | 2 +- tests/entity_specification/test_rule_100.py | 2 +- tests/entity_specification/test_rule_101.py | 2 +- tests/entity_specification/test_rule_500.py | 2 +- tests/entity_specification/test_rule_501.py | 2 +- tests/entity_specification/test_rule_503.py | 2 +- tests/exit_statement/test_rule_300.py | 2 +- tests/exit_statement/test_rule_301.py | 2 +- tests/exit_statement/test_rule_500.py | 2 +- tests/exit_statement/test_rule_501.py | 2 +- tests/exponent/test_rule_500.py | 2 +- tests/file_statement/test_rule_001.py | 2 +- tests/file_statement/test_rule_002.py | 2 +- tests/file_statement/test_rule_100.py | 2 +- tests/file_statement/test_rule_500.py | 2 +- tests/for_generate_statement/test_rule_500.py | 2 +- tests/for_generate_statement/test_rule_501.py | 2 +- tests/function/test_rule_001.py | 2 +- tests/function/test_rule_004.py | 2 +- tests/function/test_rule_005.py | 2 +- tests/function/test_rule_006.py | 2 +- tests/function/test_rule_008.py | 2 +- tests/function/test_rule_012.py | 2 +- tests/function/test_rule_013.py | 2 +- tests/function/test_rule_015.py | 2 +- tests/function/test_rule_016.py | 2 +- tests/function/test_rule_017.py | 2 +- tests/function/test_rule_018.py | 2 +- tests/function/test_rule_020.py | 2 +- tests/function/test_rule_100.py | 2 +- tests/function/test_rule_101.py | 2 +- tests/function/test_rule_300.py | 2 +- tests/function/test_rule_501.py | 2 +- tests/function/test_rule_502.py | 2 +- tests/function/test_rule_506.py | 2 +- tests/function/test_rule_507.py | 2 +- tests/function/test_rule_508.py | 2 +- tests/function/test_rule_509.py | 2 +- tests/function/test_rule_510.py | 2 +- tests/function/test_rule_511.py | 2 +- tests/function/test_rule_512.py | 2 +- tests/function/test_rule_600.py | 2 +- tests/function/test_rule_601.py | 2 +- tests/generate/test_rule_001.py | 2 +- tests/generate/test_rule_002.py | 2 +- tests/generate/test_rule_003.py | 2 +- tests/generate/test_rule_004.py | 2 +- tests/generate/test_rule_005.py | 2 +- tests/generate/test_rule_006.py | 2 +- tests/generate/test_rule_007.py | 2 +- tests/generate/test_rule_008.py | 2 +- tests/generate/test_rule_009.py | 2 +- tests/generate/test_rule_010.py | 2 +- tests/generate/test_rule_011.py | 2 +- tests/generate/test_rule_012.py | 2 +- tests/generate/test_rule_013.py | 2 +- tests/generate/test_rule_014.py | 2 +- tests/generate/test_rule_016.py | 2 +- tests/generate/test_rule_017.py | 2 +- tests/generate/test_rule_018.py | 2 +- tests/generate/test_rule_019.py | 2 +- tests/generate/test_rule_020.py | 2 +- tests/generate/test_rule_021.py | 2 +- tests/generate/test_rule_400.py | 2 +- tests/generate/test_rule_401.py | 2 +- tests/generate/test_rule_402.py | 2 +- tests/generate/test_rule_403.py | 2 +- tests/generate/test_rule_404.py | 2 +- tests/generate/test_rule_405.py | 2 +- tests/generate/test_rule_500.py | 2 +- tests/generate/test_rule_501.py | 2 +- tests/generate/test_rule_600.py | 2 +- tests/generic/test_rule_002.py | 2 +- tests/generic/test_rule_003.py | 2 +- tests/generic/test_rule_004.py | 2 +- tests/generic/test_rule_005.py | 2 +- tests/generic/test_rule_006.py | 2 +- tests/generic/test_rule_008.py | 2 +- tests/generic/test_rule_009.py | 2 +- tests/generic/test_rule_010.py | 2 +- tests/generic/test_rule_013.py | 2 +- tests/generic/test_rule_014.py | 2 +- tests/generic/test_rule_016.py | 2 +- tests/generic/test_rule_018.py | 2 +- tests/generic/test_rule_019.py | 2 +- tests/generic/test_rule_021.py | 2 +- tests/generic/test_rule_600.py | 2 +- tests/generic_map/test_rule_001.py | 2 +- tests/generic_map/test_rule_002.py | 2 +- tests/generic_map/test_rule_003.py | 2 +- tests/generic_map/test_rule_004.py | 2 +- tests/generic_map/test_rule_005.py | 2 +- tests/generic_map/test_rule_006.py | 2 +- tests/generic_map/test_rule_007.py | 2 +- tests/generic_map/test_rule_008.py | 2 +- tests/generic_map/test_rule_009.py | 2 +- tests/generic_map/test_rule_101.py | 2 +- tests/generic_map/test_rule_300.py | 2 +- tests/generic_map/test_rule_301.py | 2 +- tests/generic_map/test_rule_302.py | 2 +- tests/generic_map/test_rule_600.py | 2 +- tests/generic_map/test_rule_601.py | 2 +- tests/if_generate_statement/test_rule_300.py | 2 +- tests/if_generate_statement/test_rule_301.py | 2 +- tests/if_generate_statement/test_rule_500.py | 2 +- tests/if_generate_statement/test_rule_501.py | 2 +- tests/if_generate_statement/test_rule_502.py | 2 +- tests/if_generate_statement/test_rule_503.py | 2 +- tests/if_statement/test_rule_001.py | 2 +- tests/if_statement/test_rule_002.py | 2 +- tests/if_statement/test_rule_003.py | 2 +- tests/if_statement/test_rule_004.py | 2 +- tests/if_statement/test_rule_005.py | 2 +- tests/if_statement/test_rule_006.py | 2 +- tests/if_statement/test_rule_007.py | 2 +- tests/if_statement/test_rule_008.py | 2 +- tests/if_statement/test_rule_009.py | 2 +- tests/if_statement/test_rule_010.py | 2 +- tests/if_statement/test_rule_011.py | 2 +- tests/if_statement/test_rule_012.py | 2 +- tests/if_statement/test_rule_013.py | 2 +- tests/if_statement/test_rule_014.py | 2 +- tests/if_statement/test_rule_015.py | 2 +- tests/if_statement/test_rule_020.py | 2 +- tests/if_statement/test_rule_021.py | 2 +- tests/if_statement/test_rule_022.py | 2 +- tests/if_statement/test_rule_023.py | 2 +- tests/if_statement/test_rule_024.py | 2 +- tests/if_statement/test_rule_025.py | 2 +- tests/if_statement/test_rule_026.py | 2 +- tests/if_statement/test_rule_027.py | 2 +- tests/if_statement/test_rule_028.py | 2 +- tests/if_statement/test_rule_029.py | 2 +- tests/if_statement/test_rule_030.py | 2 +- tests/if_statement/test_rule_031.py | 2 +- tests/if_statement/test_rule_034.py | 2 +- tests/if_statement/test_rule_035.py | 2 +- tests/if_statement/test_rule_036.py | 2 +- tests/instantiation/test_rule_002.py | 2 +- tests/instantiation/test_rule_003.py | 2 +- tests/instantiation/test_rule_004.py | 2 +- tests/instantiation/test_rule_008.py | 2 +- tests/instantiation/test_rule_009.py | 2 +- tests/instantiation/test_rule_010.py | 2 +- tests/instantiation/test_rule_012.py | 2 +- tests/instantiation/test_rule_019.py | 2 +- tests/instantiation/test_rule_027.py | 2 +- tests/instantiation/test_rule_028.py | 2 +- tests/instantiation/test_rule_029.py | 2 +- tests/instantiation/test_rule_031.py | 2 +- tests/instantiation/test_rule_032.py | 2 +- tests/instantiation/test_rule_033.py | 2 +- tests/instantiation/test_rule_034.py | 2 +- tests/instantiation/test_rule_035.py | 2 +- tests/instantiation/test_rule_300.py | 2 +- tests/instantiation/test_rule_500.py | 2 +- tests/instantiation/test_rule_600.py | 2 +- tests/instantiation/test_rule_601.py | 2 +- tests/iteration_scheme/test_rule_100.py | 2 +- tests/iteration_scheme/test_rule_101.py | 2 +- tests/iteration_scheme/test_rule_300.py | 2 +- tests/iteration_scheme/test_rule_301.py | 2 +- tests/iteration_scheme/test_rule_500.py | 2 +- tests/iteration_scheme/test_rule_501.py | 2 +- tests/length/test_rule_001.py | 2 +- tests/length/test_rule_002.py | 2 +- tests/length/test_rule_003.py | 2 +- tests/library/test_rule_001.py | 2 +- tests/library/test_rule_002.py | 2 +- tests/library/test_rule_003.py | 2 +- tests/library/test_rule_004.py | 2 +- tests/library/test_rule_005.py | 2 +- tests/library/test_rule_006.py | 2 +- tests/library/test_rule_007.py | 2 +- tests/library/test_rule_008.py | 2 +- tests/library/test_rule_009.py | 2 +- tests/library/test_rule_010.py | 2 +- tests/library/test_rule_011.py | 2 +- tests/library/test_rule_500.py | 2 +- tests/logical_operator/test_rule_500.py | 2 +- tests/loop_statement/test_rule_001.py | 2 +- tests/loop_statement/test_rule_002.py | 2 +- tests/loop_statement/test_rule_003.py | 2 +- tests/loop_statement/test_rule_004.py | 2 +- tests/loop_statement/test_rule_005.py | 2 +- tests/loop_statement/test_rule_006.py | 2 +- tests/loop_statement/test_rule_007.py | 2 +- tests/loop_statement/test_rule_100.py | 2 +- tests/loop_statement/test_rule_101.py | 2 +- tests/loop_statement/test_rule_102.py | 2 +- tests/loop_statement/test_rule_103.py | 2 +- tests/loop_statement/test_rule_104.py | 2 +- tests/loop_statement/test_rule_200.py | 2 +- tests/loop_statement/test_rule_201.py | 2 +- tests/loop_statement/test_rule_202.py | 2 +- tests/loop_statement/test_rule_203.py | 2 +- tests/loop_statement/test_rule_300.py | 2 +- tests/loop_statement/test_rule_301.py | 2 +- tests/loop_statement/test_rule_302.py | 2 +- tests/loop_statement/test_rule_500.py | 2 +- tests/loop_statement/test_rule_501.py | 2 +- tests/loop_statement/test_rule_502.py | 2 +- tests/loop_statement/test_rule_503.py | 2 +- tests/loop_statement/test_rule_504.py | 2 +- tests/loop_statement/test_rule_600.py | 2 +- tests/loop_statement/test_rule_601.py | 2 +- tests/next_statement/test_rule_300.py | 2 +- tests/next_statement/test_rule_301.py | 2 +- tests/next_statement/test_rule_500.py | 2 +- tests/next_statement/test_rule_501.py | 2 +- tests/null_statement/test_rule_300.py | 2 +- tests/null_statement/test_rule_301.py | 2 +- tests/null_statement/test_rule_500.py | 2 +- tests/package/test_rule_001.py | 2 +- tests/package/test_rule_002.py | 2 +- tests/package/test_rule_003.py | 2 +- tests/package/test_rule_004.py | 2 +- tests/package/test_rule_005.py | 2 +- tests/package/test_rule_006.py | 2 +- tests/package/test_rule_007.py | 2 +- tests/package/test_rule_008.py | 2 +- tests/package/test_rule_009.py | 2 +- tests/package/test_rule_010.py | 2 +- tests/package/test_rule_011.py | 2 +- tests/package/test_rule_012.py | 2 +- tests/package/test_rule_013.py | 2 +- tests/package/test_rule_014.py | 2 +- tests/package/test_rule_015.py | 2 +- tests/package/test_rule_016.py | 2 +- tests/package/test_rule_017.py | 2 +- tests/package/test_rule_018.py | 2 +- tests/package/test_rule_019.py | 2 +- tests/package/test_rule_400.py | 2 +- tests/package/test_rule_401.py | 2 +- tests/package/test_rule_402.py | 2 +- tests/package_body/test_rule_001.py | 2 +- tests/package_body/test_rule_002.py | 2 +- tests/package_body/test_rule_003.py | 2 +- tests/package_body/test_rule_100.py | 2 +- tests/package_body/test_rule_101.py | 2 +- tests/package_body/test_rule_200.py | 2 +- tests/package_body/test_rule_201.py | 2 +- tests/package_body/test_rule_202.py | 2 +- tests/package_body/test_rule_203.py | 2 +- tests/package_body/test_rule_300.py | 2 +- tests/package_body/test_rule_301.py | 2 +- tests/package_body/test_rule_400.py | 2 +- tests/package_body/test_rule_401.py | 2 +- tests/package_body/test_rule_402.py | 2 +- tests/package_body/test_rule_500.py | 2 +- tests/package_body/test_rule_501.py | 2 +- tests/package_body/test_rule_502.py | 2 +- tests/package_body/test_rule_503.py | 2 +- tests/package_body/test_rule_504.py | 2 +- tests/package_body/test_rule_505.py | 2 +- tests/package_body/test_rule_506.py | 2 +- tests/package_body/test_rule_507.py | 2 +- tests/package_body/test_rule_600.py | 2 +- tests/package_body/test_rule_601.py | 2 +- tests/package_instantiation/test_rule_001.py | 2 +- tests/package_instantiation/test_rule_002.py | 2 +- tests/package_instantiation/test_rule_003.py | 2 +- tests/package_instantiation/test_rule_004.py | 2 +- tests/package_instantiation/test_rule_100.py | 2 +- tests/package_instantiation/test_rule_101.py | 2 +- tests/package_instantiation/test_rule_102.py | 2 +- tests/package_instantiation/test_rule_103.py | 2 +- tests/package_instantiation/test_rule_200.py | 2 +- tests/package_instantiation/test_rule_201.py | 2 +- tests/package_instantiation/test_rule_300.py | 2 +- tests/package_instantiation/test_rule_500.py | 2 +- tests/package_instantiation/test_rule_501.py | 2 +- tests/package_instantiation/test_rule_502.py | 2 +- tests/package_instantiation/test_rule_503.py | 2 +- tests/package_instantiation/test_rule_504.py | 2 +- tests/package_instantiation/test_rule_600.py | 2 +- tests/package_instantiation/test_rule_601.py | 2 +- tests/parameter_specification/test_rule_500.py | 2 +- tests/port/test_rule_001.py | 2 +- tests/port/test_rule_002.py | 2 +- tests/port/test_rule_003.py | 2 +- tests/port/test_rule_004.py | 2 +- tests/port/test_rule_007.py | 2 +- tests/port/test_rule_008.py | 2 +- tests/port/test_rule_009.py | 2 +- tests/port/test_rule_010.py | 2 +- tests/port/test_rule_011.py | 2 +- tests/port/test_rule_012.py | 2 +- tests/port/test_rule_013.py | 2 +- tests/port/test_rule_014.py | 2 +- tests/port/test_rule_015.py | 2 +- tests/port/test_rule_016.py | 2 +- tests/port/test_rule_017.py | 2 +- tests/port/test_rule_019.py | 2 +- tests/port/test_rule_020.py | 2 +- tests/port/test_rule_021.py | 2 +- tests/port/test_rule_022.py | 2 +- tests/port/test_rule_023.py | 2 +- tests/port/test_rule_024.py | 2 +- tests/port/test_rule_025.py | 2 +- tests/port/test_rule_026.py | 2 +- tests/port/test_rule_027.py | 2 +- tests/port/test_rule_600.py | 2 +- tests/port/test_rule_601.py | 2 +- tests/port/test_rule_602.py | 2 +- tests/port/test_rule_603.py | 2 +- tests/port/test_rule_604.py | 2 +- tests/port/test_rule_605.py | 2 +- tests/port/test_rule_606.py | 2 +- tests/port/test_rule_607.py | 2 +- tests/port/test_rule_608.py | 2 +- tests/port/test_rule_609.py | 2 +- tests/port_map/test_rule_001.py | 2 +- tests/port_map/test_rule_002.py | 2 +- tests/port_map/test_rule_003.py | 2 +- tests/port_map/test_rule_004.py | 2 +- tests/port_map/test_rule_005.py | 2 +- tests/port_map/test_rule_006.py | 2 +- tests/port_map/test_rule_007.py | 2 +- tests/port_map/test_rule_008.py | 2 +- tests/port_map/test_rule_009.py | 2 +- tests/port_map/test_rule_010.py | 2 +- tests/port_map/test_rule_011.py | 2 +- tests/port_map/test_rule_101.py | 2 +- tests/port_map/test_rule_200.py | 2 +- tests/port_map/test_rule_300.py | 2 +- tests/port_map/test_rule_301.py | 2 +- tests/port_map/test_rule_302.py | 2 +- tests/procedure/test_rule_001.py | 2 +- tests/procedure/test_rule_002.py | 2 +- tests/procedure/test_rule_003.py | 2 +- tests/procedure/test_rule_004.py | 2 +- tests/procedure/test_rule_005.py | 2 +- tests/procedure/test_rule_006.py | 2 +- tests/procedure/test_rule_008.py | 2 +- tests/procedure/test_rule_010.py | 2 +- tests/procedure/test_rule_012.py | 2 +- tests/procedure/test_rule_014.py | 2 +- tests/procedure/test_rule_100.py | 2 +- tests/procedure/test_rule_101.py | 2 +- tests/procedure/test_rule_200.py | 2 +- tests/procedure/test_rule_401.py | 2 +- tests/procedure/test_rule_410.py | 2 +- tests/procedure/test_rule_411.py | 2 +- tests/procedure/test_rule_500.py | 2 +- tests/procedure/test_rule_501.py | 2 +- tests/procedure/test_rule_502.py | 2 +- tests/procedure/test_rule_503.py | 2 +- tests/procedure/test_rule_504.py | 2 +- tests/procedure/test_rule_506.py | 2 +- tests/procedure/test_rule_508.py | 2 +- tests/procedure/test_rule_509.py | 2 +- tests/procedure/test_rule_510.py | 2 +- tests/procedure/test_rule_511.py | 2 +- tests/procedure_call/test_rule_001.py | 2 +- tests/procedure_call/test_rule_002.py | 2 +- tests/procedure_call/test_rule_100.py | 2 +- tests/procedure_call/test_rule_101.py | 2 +- tests/procedure_call/test_rule_300.py | 2 +- tests/procedure_call/test_rule_301.py | 2 +- tests/procedure_call/test_rule_302.py | 2 +- tests/procedure_call/test_rule_400.py | 2 +- tests/procedure_call/test_rule_401.py | 2 +- tests/procedure_call/test_rule_500.py | 2 +- tests/procedure_call/test_rule_501.py | 2 +- tests/procedure_call/test_rule_502.py | 2 +- tests/process/test_rule_001.py | 2 +- tests/process/test_rule_002.py | 2 +- tests/process/test_rule_003.py | 2 +- tests/process/test_rule_004.py | 2 +- tests/process/test_rule_005.py | 2 +- tests/process/test_rule_006.py | 2 +- tests/process/test_rule_007.py | 2 +- tests/process/test_rule_008.py | 2 +- tests/process/test_rule_009.py | 2 +- tests/process/test_rule_010.py | 2 +- tests/process/test_rule_011.py | 2 +- tests/process/test_rule_012.py | 2 +- tests/process/test_rule_013.py | 2 +- tests/process/test_rule_014.py | 2 +- tests/process/test_rule_015.py | 2 +- tests/process/test_rule_016.py | 2 +- tests/process/test_rule_017.py | 2 +- tests/process/test_rule_018.py | 2 +- tests/process/test_rule_019.py | 2 +- tests/process/test_rule_020.py | 2 +- tests/process/test_rule_021.py | 2 +- tests/process/test_rule_022.py | 2 +- tests/process/test_rule_023.py | 2 +- tests/process/test_rule_024.py | 2 +- tests/process/test_rule_025.py | 2 +- tests/process/test_rule_026.py | 2 +- tests/process/test_rule_027.py | 2 +- tests/process/test_rule_028.py | 2 +- tests/process/test_rule_029.py | 2 +- tests/process/test_rule_030.py | 2 +- tests/process/test_rule_031.py | 2 +- tests/process/test_rule_033.py | 2 +- tests/process/test_rule_034.py | 2 +- tests/process/test_rule_035.py | 2 +- tests/process/test_rule_035_smart_tabs.py | 2 +- tests/process/test_rule_036.py | 2 +- tests/process/test_rule_037.py | 2 +- tests/process/test_rule_038.py | 2 +- tests/process/test_rule_039.py | 2 +- tests/process/test_rule_600.py | 2 +- tests/protected_type/test_rule_300.py | 2 +- tests/protected_type/test_rule_500.py | 2 +- tests/protected_type/test_rule_501.py | 2 +- tests/protected_type/test_rule_502.py | 2 +- tests/protected_type_body/test_rule_300.py | 2 +- tests/protected_type_body/test_rule_400.py | 2 +- tests/protected_type_body/test_rule_401.py | 2 +- tests/protected_type_body/test_rule_402.py | 2 +- tests/protected_type_body/test_rule_500.py | 2 +- tests/protected_type_body/test_rule_501.py | 2 +- tests/protected_type_body/test_rule_502.py | 2 +- tests/protected_type_body/test_rule_503.py | 2 +- tests/protected_type_body/test_rule_504.py | 2 +- tests/ranges/test_rule_001.py | 2 +- tests/ranges/test_rule_002.py | 2 +- tests/record_type_definition/test_rule_002.py | 2 +- tests/record_type_definition/test_rule_003.py | 2 +- tests/record_type_definition/test_rule_004.py | 2 +- tests/record_type_definition/test_rule_005.py | 2 +- tests/record_type_definition/test_rule_006.py | 2 +- tests/record_type_definition/test_rule_007.py | 2 +- tests/record_type_definition/test_rule_100.py | 2 +- tests/record_type_definition/test_rule_101.py | 2 +- tests/record_type_definition/test_rule_200.py | 2 +- tests/record_type_definition/test_rule_201.py | 2 +- tests/record_type_definition/test_rule_300.py | 2 +- tests/record_type_definition/test_rule_301.py | 2 +- tests/report_statement/test_rule_001.py | 2 +- tests/report_statement/test_rule_002.py | 2 +- tests/report_statement/test_rule_100.py | 2 +- tests/report_statement/test_rule_101.py | 2 +- tests/report_statement/test_rule_300.py | 2 +- tests/report_statement/test_rule_400.py | 2 +- tests/report_statement/test_rule_500.py | 2 +- tests/report_statement/test_rule_501.py | 2 +- tests/reserved/test_rule_001.py | 2 +- tests/return_statement/test_rule_300.py | 2 +- tests/return_statement/test_rule_301.py | 2 +- tests/return_statement/test_rule_500.py | 2 +- tests/selected_assignment/test_rule_500.py | 2 +- tests/selected_assignment/test_rule_501.py | 2 +- tests/selected_assignment/test_rule_502.py | 2 +- tests/selected_assignment/test_rule_503.py | 2 +- tests/sequential/test_rule_001.py | 2 +- tests/sequential/test_rule_002.py | 2 +- tests/sequential/test_rule_003.py | 2 +- tests/sequential/test_rule_004.py | 2 +- tests/sequential/test_rule_006.py | 2 +- tests/sequential/test_rule_007.py | 2 +- tests/sequential/test_rule_008.py | 2 +- tests/sequential/test_rule_009.py | 2 +- tests/sequential/test_rule_400.py | 2 +- tests/sequential/test_rule_401.py | 2 +- tests/sequential/test_rule_402.py | 2 +- tests/shift_operator/test_rule_500.py | 2 +- tests/signal/test_rule_001.py | 2 +- tests/signal/test_rule_002.py | 2 +- tests/signal/test_rule_004.py | 2 +- tests/signal/test_rule_005.py | 2 +- tests/signal/test_rule_006.py | 2 +- tests/signal/test_rule_007.py | 2 +- tests/signal/test_rule_008.py | 2 +- tests/signal/test_rule_012.py | 2 +- tests/signal/test_rule_015.py | 2 +- tests/signal/test_rule_100.py | 2 +- tests/signal/test_rule_101.py | 2 +- tests/signal/test_rule_102.py | 2 +- tests/signal/test_rule_200.py | 2 +- tests/signal/test_rule_400.py | 2 +- tests/signal/test_rule_600.py | 2 +- tests/subprogram_body/test_rule_201.py | 2 +- tests/subprogram_body/test_rule_202.py | 2 +- tests/subprogram_body/test_rule_203.py | 2 +- tests/subprogram_body/test_rule_204.py | 2 +- tests/subprogram_body/test_rule_205.py | 2 +- tests/subprogram_instantiation/test_rule_100.py | 2 +- tests/subtype/test_rule_001.py | 2 +- tests/subtype/test_rule_004.py | 2 +- tests/subtype/test_rule_005.py | 2 +- tests/subtype/test_rule_100.py | 2 +- tests/subtype/test_rule_101.py | 2 +- tests/subtype/test_rule_102.py | 2 +- tests/subtype/test_rule_200.py | 2 +- tests/subtype/test_rule_201.py | 2 +- tests/subtype/test_rule_202.py | 2 +- tests/subtype/test_rule_500.py | 2 +- tests/subtype/test_rule_501.py | 2 +- tests/subtype/test_rule_502.py | 2 +- tests/subtype/test_rule_600.py | 2 +- tests/type_definition/test_rule_001.py | 2 +- tests/type_definition/test_rule_002.py | 2 +- tests/type_definition/test_rule_004.py | 2 +- tests/type_definition/test_rule_005.py | 2 +- tests/type_definition/test_rule_006.py | 2 +- tests/type_definition/test_rule_007.py | 2 +- tests/type_definition/test_rule_008.py | 2 +- tests/type_definition/test_rule_009.py | 2 +- tests/type_definition/test_rule_010.py | 2 +- tests/type_definition/test_rule_011.py | 2 +- tests/type_definition/test_rule_012.py | 2 +- tests/type_definition/test_rule_013.py | 2 +- tests/type_definition/test_rule_015.py | 2 +- tests/type_definition/test_rule_016.py | 2 +- tests/type_definition/test_rule_017.py | 2 +- tests/type_definition/test_rule_018.py | 2 +- tests/type_definition/test_rule_100.py | 2 +- tests/type_definition/test_rule_200.py | 2 +- tests/type_definition/test_rule_400.py | 2 +- tests/type_definition/test_rule_600.py | 2 +- tests/type_mark/test_rule_500.py | 2 +- tests/use_clause/test_rule_500.py | 2 +- tests/use_clause/test_rule_501.py | 2 +- tests/use_clause/test_rule_502.py | 2 +- tests/use_clause/test_rule_503.py | 2 +- tests/variable/test_rule_001.py | 2 +- tests/variable/test_rule_002.py | 2 +- tests/variable/test_rule_004.py | 2 +- tests/variable/test_rule_005.py | 2 +- tests/variable/test_rule_006.py | 2 +- tests/variable/test_rule_007.py | 2 +- tests/variable/test_rule_012.py | 2 +- tests/variable/test_rule_100.py | 2 +- tests/variable/test_rule_400.py | 2 +- tests/variable/test_rule_600.py | 2 +- tests/variable_assignment/test_rule_001.py | 2 +- tests/variable_assignment/test_rule_002.py | 2 +- tests/variable_assignment/test_rule_003.py | 2 +- tests/variable_assignment/test_rule_004.py | 2 +- tests/variable_assignment/test_rule_006.py | 2 +- tests/variable_assignment/test_rule_007.py | 2 +- tests/variable_assignment/test_rule_008.py | 2 +- tests/variable_assignment/test_rule_400.py | 2 +- tests/variable_assignment/test_rule_401.py | 2 +- tests/wait/test_rule_001.py | 2 +- tests/wait/test_rule_300.py | 2 +- tests/wait/test_rule_500.py | 2 +- tests/wait/test_rule_501.py | 2 +- tests/wait/test_rule_502.py | 2 +- tests/wait/test_rule_503.py | 2 +- tests/when/test_rule_001.py | 2 +- tests/whitespace/test_rule_003.py | 2 +- tests/whitespace/test_rule_004.py | 2 +- tests/whitespace/test_rule_005.py | 2 +- tests/whitespace/test_rule_006.py | 2 +- tests/whitespace/test_rule_007.py | 2 +- tests/whitespace/test_rule_008.py | 2 +- tests/whitespace/test_rule_010.py | 2 +- tests/whitespace/test_rule_011.py | 2 +- tests/whitespace/test_rule_013.py | 2 +- tests/whitespace/test_rule_101.py | 2 +- 822 files changed, 822 insertions(+), 822 deletions(-) diff --git a/tests/after/test_rule_001.py b/tests/after/test_rule_001.py index 580c7c0ef..05b61b873 100644 --- a/tests/after/test_rule_001.py +++ b/tests/after/test_rule_001.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_after_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/after/test_rule_002.py b/tests/after/test_rule_002.py index e21bea6dd..f230ae774 100644 --- a/tests/after/test_rule_002.py +++ b/tests/after/test_rule_002.py @@ -44,7 +44,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed_no_no_no.vhd"), lExpected_no_no_no) -class test_after_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/after/test_rule_003.py b/tests/after/test_rule_003.py index 857f201a6..5f2c965dc 100644 --- a/tests/after/test_rule_003.py +++ b/tests/after/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_after_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/after/test_rule_500.py b/tests/after/test_rule_500.py index 42ba418c6..5ce939905 100644 --- a/tests/after/test_rule_500.py +++ b/tests/after/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_after_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/alias_declaration/test_rule_001.py b/tests/alias_declaration/test_rule_001.py index 159936009..4490737d7 100644 --- a/tests/alias_declaration/test_rule_001.py +++ b/tests/alias_declaration/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_alias_declaration_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/alias_declaration/test_rule_100.py b/tests/alias_declaration/test_rule_100.py index 1fc014ccb..57094ef09 100644 --- a/tests/alias_declaration/test_rule_100.py +++ b/tests/alias_declaration/test_rule_100.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_alias_declaration_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/alias_declaration/test_rule_101.py b/tests/alias_declaration/test_rule_101.py index 432c14933..e141295e8 100644 --- a/tests/alias_declaration/test_rule_101.py +++ b/tests/alias_declaration/test_rule_101.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_alias_declaration_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/alias_declaration/test_rule_102.py b/tests/alias_declaration/test_rule_102.py index a531824ee..c56584adc 100644 --- a/tests/alias_declaration/test_rule_102.py +++ b/tests/alias_declaration/test_rule_102.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_102_test_input.fixed.vhd"), lExpected) -class test_alias_declaration_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/alias_declaration/test_rule_103.py b/tests/alias_declaration/test_rule_103.py index fa7f65943..bb1244935 100644 --- a/tests/alias_declaration/test_rule_103.py +++ b/tests/alias_declaration/test_rule_103.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_103_test_input.fixed.vhd"), lExpected) -class test_alias_declaration_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/alias_declaration/test_rule_300.py b/tests/alias_declaration/test_rule_300.py index 37311d0e4..778184790 100644 --- a/tests/alias_declaration/test_rule_300.py +++ b/tests/alias_declaration/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_alias_declaration_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/alias_declaration/test_rule_500.py b/tests/alias_declaration/test_rule_500.py index 8f379dec2..9ff16f327 100644 --- a/tests/alias_declaration/test_rule_500.py +++ b/tests/alias_declaration/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_alias_declaration_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/alias_declaration/test_rule_501.py b/tests/alias_declaration/test_rule_501.py index 5221c7559..ac8fb8a09 100644 --- a/tests/alias_declaration/test_rule_501.py +++ b/tests/alias_declaration/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_alias_declaration_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/alias_declaration/test_rule_502.py b/tests/alias_declaration/test_rule_502.py index a2820d561..2c3418df2 100644 --- a/tests/alias_declaration/test_rule_502.py +++ b/tests/alias_declaration/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_alias_declaration_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/alias_declaration/test_rule_600.py b/tests/alias_declaration/test_rule_600.py index 416558c9e..8cb01970d 100644 --- a/tests/alias_declaration/test_rule_600.py +++ b/tests/alias_declaration/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_alias_declaration_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/alias_declaration/test_rule_601.py b/tests/alias_declaration/test_rule_601.py index 79a0ed250..2e4590b08 100644 --- a/tests/alias_declaration/test_rule_601.py +++ b/tests/alias_declaration/test_rule_601.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_601_test_input.vhd")) -class test_alias_declaration_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_001.py b/tests/architecture/test_rule_001.py index b0c432b01..266b528a8 100644 --- a/tests/architecture/test_rule_001.py +++ b/tests/architecture/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_003.py b/tests/architecture/test_rule_003.py index 72f031ab6..10aed00f6 100644 --- a/tests/architecture/test_rule_003.py +++ b/tests/architecture/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_004.py b/tests/architecture/test_rule_004.py index 1cafb76eb..346d25990 100644 --- a/tests/architecture/test_rule_004.py +++ b/tests/architecture/test_rule_004.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed_upper.vhd"), lExpected_upper) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_005.py b/tests/architecture/test_rule_005.py index bdd9d1b4f..6538b2acc 100644 --- a/tests/architecture/test_rule_005.py +++ b/tests/architecture/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_006.py b/tests/architecture/test_rule_006.py index 2d7de3a73..cb8a08ab4 100644 --- a/tests/architecture/test_rule_006.py +++ b/tests/architecture/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_007.py b/tests/architecture/test_rule_007.py index 4299e51c0..c763863cb 100644 --- a/tests/architecture/test_rule_007.py +++ b/tests/architecture/test_rule_007.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_008.py b/tests/architecture/test_rule_008.py index cc187fea8..94cf7ea1e 100644 --- a/tests/architecture/test_rule_008.py +++ b/tests/architecture/test_rule_008.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_009.py b/tests/architecture/test_rule_009.py index d0214f0b6..92c534c44 100644 --- a/tests/architecture/test_rule_009.py +++ b/tests/architecture/test_rule_009.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed_upper.vhd"), lExpected_upper) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_010.py b/tests/architecture/test_rule_010.py index bb5dd5a02..d8356de00 100644 --- a/tests/architecture/test_rule_010.py +++ b/tests/architecture/test_rule_010.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed_remove.vhd"), lExpected_remove) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_011.py b/tests/architecture/test_rule_011.py index 0f94f58d4..6c5e0f1a0 100644 --- a/tests/architecture/test_rule_011.py +++ b/tests/architecture/test_rule_011.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_011_test_input.fixed_upper.vhd"), lExpected_upper) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_012.py b/tests/architecture/test_rule_012.py index af2a88b8e..771ab930f 100644 --- a/tests/architecture/test_rule_012.py +++ b/tests/architecture/test_rule_012.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_012_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_013.py b/tests/architecture/test_rule_013.py index 4a9171824..8c3932ec8 100644 --- a/tests/architecture/test_rule_013.py +++ b/tests/architecture/test_rule_013.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_013_test_input.fixed_upper.vhd"), lExpected_upper) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_014.py b/tests/architecture/test_rule_014.py index 891387011..a01a89563 100644 --- a/tests/architecture/test_rule_014.py +++ b/tests/architecture/test_rule_014.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_014_test_input.fixed_upper.vhd"), lExpected_upper) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_015.py b/tests/architecture/test_rule_015.py index fce8ab7f3..ed67570ee 100644 --- a/tests/architecture/test_rule_015.py +++ b/tests/architecture/test_rule_015.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_015_test_input.fixed_no_blank.vhd"), lExpected_no_blank) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_016.py b/tests/architecture/test_rule_016.py index a4a2db51c..995186fca 100644 --- a/tests/architecture/test_rule_016.py +++ b/tests/architecture/test_rule_016.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_016_test_input.fixed_no_blank.vhd"), lExpected_no_blank) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_017.py b/tests/architecture/test_rule_017.py index 194be7872..58a1d2d2b 100644 --- a/tests/architecture/test_rule_017.py +++ b/tests/architecture/test_rule_017.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_017_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_018.py b/tests/architecture/test_rule_018.py index c7aa8d622..56d0a4847 100644 --- a/tests/architecture/test_rule_018.py +++ b/tests/architecture/test_rule_018.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_018_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_019.py b/tests/architecture/test_rule_019.py index 4933dec21..80d157ec7 100644 --- a/tests/architecture/test_rule_019.py +++ b/tests/architecture/test_rule_019.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_019_test_input.fixed_upper.vhd"), lExpected_upper) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_020.py b/tests/architecture/test_rule_020.py index 1e02e6026..54f76c479 100644 --- a/tests/architecture/test_rule_020.py +++ b/tests/architecture/test_rule_020.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_020_test_input.fixed_upper.vhd"), lExpected_upper) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_021.py b/tests/architecture/test_rule_021.py index 72725f901..28126e904 100644 --- a/tests/architecture/test_rule_021.py +++ b/tests/architecture/test_rule_021.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_021_test_input.fixed_upper.vhd"), lExpected_upper) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_022.py b/tests/architecture/test_rule_022.py index 2a51b6f11..8b26e2aee 100644 --- a/tests/architecture/test_rule_022.py +++ b/tests/architecture/test_rule_022.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_022_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_024.py b/tests/architecture/test_rule_024.py index 73c33c32b..348ba92ac 100644 --- a/tests/architecture/test_rule_024.py +++ b/tests/architecture/test_rule_024.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_024_test_input.fixed_remove.vhd"), lExpected_remove) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_025.py b/tests/architecture/test_rule_025.py index b1b4ae72f..b5e1e0f4c 100644 --- a/tests/architecture/test_rule_025.py +++ b/tests/architecture/test_rule_025.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_025_test_input.vhd")) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_027.py b/tests/architecture/test_rule_027.py index 85ab24754..501db5c24 100644 --- a/tests/architecture/test_rule_027.py +++ b/tests/architecture/test_rule_027.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_027_test_input.vhd")) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_028.py b/tests/architecture/test_rule_028.py index c25a95485..b601ed865 100644 --- a/tests/architecture/test_rule_028.py +++ b/tests/architecture/test_rule_028.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_028_test_input.fixed_upper.vhd"), lExpected_upper) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_029.py b/tests/architecture/test_rule_029.py index 98767f4b7..d18a61560 100644 --- a/tests/architecture/test_rule_029.py +++ b/tests/architecture/test_rule_029.py @@ -16,7 +16,7 @@ # utils.read_file(os.path.join(sTestDir, 'rule_029_test_input.fixed_allowing_comments_and_blank_lines.vhd'), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_030.py b/tests/architecture/test_rule_030.py index 7c4ed2b9b..166dc9aba 100644 --- a/tests/architecture/test_rule_030.py +++ b/tests/architecture/test_rule_030.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_030_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_031.py b/tests/architecture/test_rule_031.py index 57f81a140..56291cc30 100644 --- a/tests/architecture/test_rule_031.py +++ b/tests/architecture/test_rule_031.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_031_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_032.py b/tests/architecture/test_rule_032.py index a49188a03..2cccc771b 100644 --- a/tests/architecture/test_rule_032.py +++ b/tests/architecture/test_rule_032.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_032_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_033.py b/tests/architecture/test_rule_033.py index a6f881b34..58129dcfa 100644 --- a/tests/architecture/test_rule_033.py +++ b/tests/architecture/test_rule_033.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_033_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_200.py b/tests/architecture/test_rule_200.py index 433c9ee3d..f11f54703 100644 --- a/tests/architecture/test_rule_200.py +++ b/tests/architecture/test_rule_200.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_200_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_400.py b/tests/architecture/test_rule_400.py index 88c29f979..66d48ed3d 100644 --- a/tests/architecture/test_rule_400.py +++ b/tests/architecture/test_rule_400.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_400_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/architecture/test_rule_601.py b/tests/architecture/test_rule_601.py index 78f0781c2..e3a26a0ea 100644 --- a/tests/architecture/test_rule_601.py +++ b/tests/architecture/test_rule_601.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_601_test_input.fixed.vhd"), lExpected) -class test_architecture_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/array_constraint/test_rule_500.py b/tests/array_constraint/test_rule_500.py index b454fb9ef..e01ff82f7 100644 --- a/tests/array_constraint/test_rule_500.py +++ b/tests/array_constraint/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/assert_statement/test_rule_002.py b/tests/assert_statement/test_rule_002.py index 4f914c6fc..806e0be3b 100644 --- a/tests/assert_statement/test_rule_002.py +++ b/tests/assert_statement/test_rule_002.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/assert_statement/test_rule_003.py b/tests/assert_statement/test_rule_003.py index a52968653..5d44ab7a6 100644 --- a/tests/assert_statement/test_rule_003.py +++ b/tests/assert_statement/test_rule_003.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/assert_statement/test_rule_004.py b/tests/assert_statement/test_rule_004.py index c6f73f500..61350873f 100644 --- a/tests/assert_statement/test_rule_004.py +++ b/tests/assert_statement/test_rule_004.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/assert_statement/test_rule_005.py b/tests/assert_statement/test_rule_005.py index 66fb5991d..3f383d10b 100644 --- a/tests/assert_statement/test_rule_005.py +++ b/tests/assert_statement/test_rule_005.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/assert_statement/test_rule_100.py b/tests/assert_statement/test_rule_100.py index 40a9392c9..556b4f1b7 100644 --- a/tests/assert_statement/test_rule_100.py +++ b/tests/assert_statement/test_rule_100.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/assert_statement/test_rule_101.py b/tests/assert_statement/test_rule_101.py index 413d453a3..ca8e39c39 100644 --- a/tests/assert_statement/test_rule_101.py +++ b/tests/assert_statement/test_rule_101.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/assert_statement/test_rule_102.py b/tests/assert_statement/test_rule_102.py index 4c1ee8a55..68ff7b78d 100644 --- a/tests/assert_statement/test_rule_102.py +++ b/tests/assert_statement/test_rule_102.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_102_test_input.fixed.vhd"), lExpected) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/assert_statement/test_rule_400.py b/tests/assert_statement/test_rule_400.py index ea194972e..b79d6775b 100644 --- a/tests/assert_statement/test_rule_400.py +++ b/tests/assert_statement/test_rule_400.py @@ -32,7 +32,7 @@ utils.read_file(os.path.join(sTestDir, "rule_400_test_input.fixed_left_aligned__smart_tabs.vhd"), lExpected_left_aligned_smart_tabs) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/assert_statement/test_rule_500.py b/tests/assert_statement/test_rule_500.py index c7b68fbd3..6074e5c06 100644 --- a/tests/assert_statement/test_rule_500.py +++ b/tests/assert_statement/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/assert_statement/test_rule_501.py b/tests/assert_statement/test_rule_501.py index 924a119b4..f2de5d4a4 100644 --- a/tests/assert_statement/test_rule_501.py +++ b/tests/assert_statement/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/assert_statement/test_rule_502.py b/tests/assert_statement/test_rule_502.py index 469d9edf1..ca8cfbaa6 100644 --- a/tests/assert_statement/test_rule_502.py +++ b/tests/assert_statement/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/attribute/test_rule_500.py b/tests/attribute/test_rule_500.py index b6a39acda..3308a13d6 100644 --- a/tests/attribute/test_rule_500.py +++ b/tests/attribute/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_attribute_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/attribute_declaration/test_rule_500.py b/tests/attribute_declaration/test_rule_500.py index 05d5f06b6..77267b421 100644 --- a/tests/attribute_declaration/test_rule_500.py +++ b/tests/attribute_declaration/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_attribute_declaration_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/attribute_declaration/test_rule_501.py b/tests/attribute_declaration/test_rule_501.py index b52e66b58..ec1babd0f 100644 --- a/tests/attribute_declaration/test_rule_501.py +++ b/tests/attribute_declaration/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_attribute_declaration_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/attribute_declaration/test_rule_502.py b/tests/attribute_declaration/test_rule_502.py index 3449c5bbe..2433b579e 100644 --- a/tests/attribute_declaration/test_rule_502.py +++ b/tests/attribute_declaration/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_attribute_declaration_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/attribute_specification/test_rule_500.py b/tests/attribute_specification/test_rule_500.py index 6b0367a5f..0d4626654 100644 --- a/tests/attribute_specification/test_rule_500.py +++ b/tests/attribute_specification/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_attribute_specification_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/attribute_specification/test_rule_501.py b/tests/attribute_specification/test_rule_501.py index bda4f92af..5d2d5d53f 100644 --- a/tests/attribute_specification/test_rule_501.py +++ b/tests/attribute_specification/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_attribute_specification_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/attribute_specification/test_rule_502.py b/tests/attribute_specification/test_rule_502.py index fe48b1b2e..02707c53f 100644 --- a/tests/attribute_specification/test_rule_502.py +++ b/tests/attribute_specification/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_attribute_specification_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/attribute_specification/test_rule_503.py b/tests/attribute_specification/test_rule_503.py index 489a0d23c..59a8a3fa1 100644 --- a/tests/attribute_specification/test_rule_503.py +++ b/tests/attribute_specification/test_rule_503.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_503_test_input.fixed_upper.vhd"), lExpected_upper) -class test_attribute_specification_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/bit_string_literal/test_rule_500.py b/tests/bit_string_literal/test_rule_500.py index 628eec5a6..49430efcd 100644 --- a/tests/bit_string_literal/test_rule_500.py +++ b/tests/bit_string_literal/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_bit_string_literal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/bit_string_literal/test_rule_501.py b/tests/bit_string_literal/test_rule_501.py index 662da8417..beb9ced47 100644 --- a/tests/bit_string_literal/test_rule_501.py +++ b/tests/bit_string_literal/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_bit_string_literal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_001.py b/tests/block/test_rule_001.py index 7b3581a5b..a61d13648 100644 --- a/tests/block/test_rule_001.py +++ b/tests/block/test_rule_001.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_002.py b/tests/block/test_rule_002.py index 620dd3bcd..f60e4d66e 100644 --- a/tests/block/test_rule_002.py +++ b/tests/block/test_rule_002.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed_remove.vhd"), lExpected_remove) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_003.py b/tests/block/test_rule_003.py index 2bb8da449..94a402ae0 100644 --- a/tests/block/test_rule_003.py +++ b/tests/block/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_004.py b/tests/block/test_rule_004.py index ab94fa58b..e0e08b889 100644 --- a/tests/block/test_rule_004.py +++ b/tests/block/test_rule_004.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_005.py b/tests/block/test_rule_005.py index b064a71f3..b5d8ef38d 100644 --- a/tests/block/test_rule_005.py +++ b/tests/block/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_006.py b/tests/block/test_rule_006.py index d859fc3d2..2816faf3f 100644 --- a/tests/block/test_rule_006.py +++ b/tests/block/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_007.py b/tests/block/test_rule_007.py index 4ba1fb09a..6841d06b3 100644 --- a/tests/block/test_rule_007.py +++ b/tests/block/test_rule_007.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed_remove.vhd"), lExpected_remove) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_100.py b/tests/block/test_rule_100.py index 92466dc31..68b1bddb3 100644 --- a/tests/block/test_rule_100.py +++ b/tests/block/test_rule_100.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_101.py b/tests/block/test_rule_101.py index e3a50a79d..035ab1247 100644 --- a/tests/block/test_rule_101.py +++ b/tests/block/test_rule_101.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_200.py b/tests/block/test_rule_200.py index 31b1cd6dc..e526342f8 100644 --- a/tests/block/test_rule_200.py +++ b/tests/block/test_rule_200.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_200_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_201.py b/tests/block/test_rule_201.py index 40c0a6532..072a08f4a 100644 --- a/tests/block/test_rule_201.py +++ b/tests/block/test_rule_201.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_201_test_input.fixed_no_blank_line.vhd"), lExpected_no_blank_line, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_202.py b/tests/block/test_rule_202.py index 07a2b2392..1db08f99a 100644 --- a/tests/block/test_rule_202.py +++ b/tests/block/test_rule_202.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_202_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_203.py b/tests/block/test_rule_203.py index 944121a92..4c2947cca 100644 --- a/tests/block/test_rule_203.py +++ b/tests/block/test_rule_203.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_203_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_204.py b/tests/block/test_rule_204.py index 74463b0e1..a0cecadcb 100644 --- a/tests/block/test_rule_204.py +++ b/tests/block/test_rule_204.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_204_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_205.py b/tests/block/test_rule_205.py index bb2ac2436..697d54c77 100644 --- a/tests/block/test_rule_205.py +++ b/tests/block/test_rule_205.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_205_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_300.py b/tests/block/test_rule_300.py index 4fe67e2b1..80fbf5f34 100644 --- a/tests/block/test_rule_300.py +++ b/tests/block/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_301.py b/tests/block/test_rule_301.py index 2f09be79b..e9aeb37ae 100644 --- a/tests/block/test_rule_301.py +++ b/tests/block/test_rule_301.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_301_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_302.py b/tests/block/test_rule_302.py index 10f436f0f..2b2850862 100644 --- a/tests/block/test_rule_302.py +++ b/tests/block/test_rule_302.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_302_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_400.py b/tests/block/test_rule_400.py index 429bd0e52..9409a0045 100644 --- a/tests/block/test_rule_400.py +++ b/tests/block/test_rule_400.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_400_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_401.py b/tests/block/test_rule_401.py index ff08ff917..767ec35a8 100644 --- a/tests/block/test_rule_401.py +++ b/tests/block/test_rule_401.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_401_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_402.py b/tests/block/test_rule_402.py index 0608f4442..f20f5f34d 100644 --- a/tests/block/test_rule_402.py +++ b/tests/block/test_rule_402.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_402_test_input.fixed.vhd"), lExpected, False) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_500.py b/tests/block/test_rule_500.py index 4bd23fa23..a12e33d0a 100644 --- a/tests/block/test_rule_500.py +++ b/tests/block/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_block_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_501.py b/tests/block/test_rule_501.py index a5522a581..e09e3dfa5 100644 --- a/tests/block/test_rule_501.py +++ b/tests/block/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_block_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_502.py b/tests/block/test_rule_502.py index 3ee9d2cd1..fafc9dc71 100644 --- a/tests/block/test_rule_502.py +++ b/tests/block/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_block_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_503.py b/tests/block/test_rule_503.py index a1b3698d6..20ea393eb 100644 --- a/tests/block/test_rule_503.py +++ b/tests/block/test_rule_503.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_503_test_input.fixed_upper.vhd"), lExpected_upper) -class test_block_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_504.py b/tests/block/test_rule_504.py index 3df2bc870..aa02452d9 100644 --- a/tests/block/test_rule_504.py +++ b/tests/block/test_rule_504.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_504_test_input.fixed_upper.vhd"), lExpected_upper) -class test_block_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_505.py b/tests/block/test_rule_505.py index f510e4462..45d87a73e 100644 --- a/tests/block/test_rule_505.py +++ b/tests/block/test_rule_505.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_505_test_input.fixed_upper.vhd"), lExpected_upper) -class test_block_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_506.py b/tests/block/test_rule_506.py index 56fbac443..73089a2ec 100644 --- a/tests/block/test_rule_506.py +++ b/tests/block/test_rule_506.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_506_test_input.fixed_upper.vhd"), lExpected_upper) -class test_block_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_600.py b/tests/block/test_rule_600.py index cbf666995..71a180664 100644 --- a/tests/block/test_rule_600.py +++ b/tests/block/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block/test_rule_601.py b/tests/block/test_rule_601.py index 37f9e94e7..07c51614b 100644 --- a/tests/block/test_rule_601.py +++ b/tests/block/test_rule_601.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_601_test_input.vhd")) -class test_block_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block_comment/test_rule_001.py b/tests/block_comment/test_rule_001.py index 3bf98050e..1246e18ad 100644 --- a/tests/block_comment/test_rule_001.py +++ b/tests/block_comment/test_rule_001.py @@ -16,7 +16,7 @@ lFile_align_left, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_001_test_input.align_left.vhd")) -class test_block_comment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block_comment/test_rule_002.py b/tests/block_comment/test_rule_002.py index 5a128c042..d133452b6 100644 --- a/tests/block_comment/test_rule_002.py +++ b/tests/block_comment/test_rule_002.py @@ -14,7 +14,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_002_test_input.vhd")) -class test_block_comment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/block_comment/test_rule_003.py b/tests/block_comment/test_rule_003.py index 6eb9fafca..81de75ddf 100644 --- a/tests/block_comment/test_rule_003.py +++ b/tests/block_comment/test_rule_003.py @@ -14,7 +14,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_003_test_input.vhd")) -class test_block_comment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_001.py b/tests/case/test_rule_001.py index 1443cbdec..647423428 100644 --- a/tests/case/test_rule_001.py +++ b/tests/case/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_002.py b/tests/case/test_rule_002.py index 24b2ae705..3ed6a924d 100644 --- a/tests/case/test_rule_002.py +++ b/tests/case/test_rule_002.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_003.py b/tests/case/test_rule_003.py index e94636c72..d09368da3 100644 --- a/tests/case/test_rule_003.py +++ b/tests/case/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_004.py b/tests/case/test_rule_004.py index f5bbf8b60..6e27159cf 100644 --- a/tests/case/test_rule_004.py +++ b/tests/case/test_rule_004.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_005.py b/tests/case/test_rule_005.py index 3f9881f41..1fb3b4e6d 100644 --- a/tests/case/test_rule_005.py +++ b/tests/case/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_006.py b/tests/case/test_rule_006.py index f499eca95..79266e16e 100644 --- a/tests/case/test_rule_006.py +++ b/tests/case/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_007.py b/tests/case/test_rule_007.py index 3d4b2f380..6475f797b 100644 --- a/tests/case/test_rule_007.py +++ b/tests/case/test_rule_007.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_009.py b/tests/case/test_rule_009.py index b7f14ab57..7858467d1 100644 --- a/tests/case/test_rule_009.py +++ b/tests/case/test_rule_009.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_010.py b/tests/case/test_rule_010.py index 839041147..3b30bffc5 100644 --- a/tests/case/test_rule_010.py +++ b/tests/case/test_rule_010.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_011.py b/tests/case/test_rule_011.py index 2f6f84095..4b368220d 100644 --- a/tests/case/test_rule_011.py +++ b/tests/case/test_rule_011.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_011_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_012.py b/tests/case/test_rule_012.py index 9c76b9a1e..8e40b9028 100644 --- a/tests/case/test_rule_012.py +++ b/tests/case/test_rule_012.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_012_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_014.py b/tests/case/test_rule_014.py index 2384a9da8..de0aa7a8e 100644 --- a/tests/case/test_rule_014.py +++ b/tests/case/test_rule_014.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_014_test_input.fixed_upper.vhd"), lExpected_upper) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_015.py b/tests/case/test_rule_015.py index 1f95e40cf..fc671162e 100644 --- a/tests/case/test_rule_015.py +++ b/tests/case/test_rule_015.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_015_test_input.fixed_upper.vhd"), lExpected_upper) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_016.py b/tests/case/test_rule_016.py index bd946592b..1e8dc267e 100644 --- a/tests/case/test_rule_016.py +++ b/tests/case/test_rule_016.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_016_test_input.fixed_upper.vhd"), lExpected_upper) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_017.py b/tests/case/test_rule_017.py index 695627932..8c84b5526 100644 --- a/tests/case/test_rule_017.py +++ b/tests/case/test_rule_017.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_017_test_input.fixed_upper.vhd"), lExpected_upper) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_018.py b/tests/case/test_rule_018.py index 99b3a6b31..f8876d042 100644 --- a/tests/case/test_rule_018.py +++ b/tests/case/test_rule_018.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_018_test_input.fixed_upper.vhd"), lExpected_upper) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_019.py b/tests/case/test_rule_019.py index d20b0ae7f..158f4fe9b 100644 --- a/tests/case/test_rule_019.py +++ b/tests/case/test_rule_019.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_019_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_020.py b/tests/case/test_rule_020.py index 191b266a4..89b3d89f5 100644 --- a/tests/case/test_rule_020.py +++ b/tests/case/test_rule_020.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_020_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_200.py b/tests/case/test_rule_200.py index 60ae56f79..6b13cefb2 100644 --- a/tests/case/test_rule_200.py +++ b/tests/case/test_rule_200.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_200_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_201.py b/tests/case/test_rule_201.py index 822b7a804..e4790e93e 100644 --- a/tests/case/test_rule_201.py +++ b/tests/case/test_rule_201.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_201_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case/test_rule_300.py b/tests/case/test_rule_300.py index db4881804..0fe6d4ba1 100644 --- a/tests/case/test_rule_300.py +++ b/tests/case/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_case_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case_generate_alternative/test_rule_500.py b/tests/case_generate_alternative/test_rule_500.py index 0c6b400e3..9bd86f522 100644 --- a/tests/case_generate_alternative/test_rule_500.py +++ b/tests/case_generate_alternative/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_case_generate_alternative_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case_generate_statement/test_rule_400.py b/tests/case_generate_statement/test_rule_400.py index d894bf824..c839974f2 100644 --- a/tests/case_generate_statement/test_rule_400.py +++ b/tests/case_generate_statement/test_rule_400.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_400_test_input.fixed_compact_alignment__true.vhd"), lExpected_true) -class test_case_generate_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case_generate_statement/test_rule_500.py b/tests/case_generate_statement/test_rule_500.py index 7eebd9142..468e392c8 100644 --- a/tests/case_generate_statement/test_rule_500.py +++ b/tests/case_generate_statement/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_case_generate_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/case_generate_statement/test_rule_501.py b/tests/case_generate_statement/test_rule_501.py index 6d2568360..8e4eab9ea 100644 --- a/tests/case_generate_statement/test_rule_501.py +++ b/tests/case_generate_statement/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_case_generate_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/choice/test_rule_500.py b/tests/choice/test_rule_500.py index e0ed51acd..2abe42676 100644 --- a/tests/choice/test_rule_500.py +++ b/tests/choice/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_choice_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/comment/test_rule_004.py b/tests/comment/test_rule_004.py index 25ed9c3a2..34ad2b08e 100644 --- a/tests/comment/test_rule_004.py +++ b/tests/comment/test_rule_004.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected) -class test_comment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/comment/test_rule_010.py b/tests/comment/test_rule_010.py index ddc177b94..7c3a747c6 100644 --- a/tests/comment/test_rule_010.py +++ b/tests/comment/test_rule_010.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed.vhd"), lExpected) -class test_comment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/comment/test_rule_011.py b/tests/comment/test_rule_011.py index 68253363e..020e301c1 100644 --- a/tests/comment/test_rule_011.py +++ b/tests/comment/test_rule_011.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_011_test_input.fixed.vhd"), lExpected) -class test_comment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/comment/test_rule_012.py b/tests/comment/test_rule_012.py index 6fe63fc29..0b0ed5886 100644 --- a/tests/comment/test_rule_012.py +++ b/tests/comment/test_rule_012.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_012_test_input.vhd")) -class test_comment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/comment/test_rule_100.py b/tests/comment/test_rule_100.py index e430a4ec3..c45173b21 100644 --- a/tests/comment/test_rule_100.py +++ b/tests/comment/test_rule_100.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_comment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.oFile.lAllObjects[-2].is_block_comment = True diff --git a/tests/component/test_rule_001.py b/tests/component/test_rule_001.py index e20dab218..9398540d8 100644 --- a/tests/component/test_rule_001.py +++ b/tests/component/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_002.py b/tests/component/test_rule_002.py index 0fdd37e9b..97764abfa 100644 --- a/tests/component/test_rule_002.py +++ b/tests/component/test_rule_002.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_003.py b/tests/component/test_rule_003.py index b09e0336a..32bb3f9df 100644 --- a/tests/component/test_rule_003.py +++ b/tests/component/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_004.py b/tests/component/test_rule_004.py index 11455eff9..92615cca3 100644 --- a/tests/component/test_rule_004.py +++ b/tests/component/test_rule_004.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed_upper.vhd"), lExpected_upper) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_005.py b/tests/component/test_rule_005.py index d17def1c1..e4221f075 100644 --- a/tests/component/test_rule_005.py +++ b/tests/component/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected, bStrip=False) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_006.py b/tests/component/test_rule_006.py index 0cb6a372e..b98d78ca8 100644 --- a/tests/component/test_rule_006.py +++ b/tests/component/test_rule_006.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed_upper.vhd"), lExpected_upper) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_007.py b/tests/component/test_rule_007.py index 53f7d2054..791a532d0 100644 --- a/tests/component/test_rule_007.py +++ b/tests/component/test_rule_007.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_008.py b/tests/component/test_rule_008.py index ce9dee01a..56016fa7c 100644 --- a/tests/component/test_rule_008.py +++ b/tests/component/test_rule_008.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed_upper.vhd"), lExpected_upper) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_009.py b/tests/component/test_rule_009.py index 25145653b..b4c94607f 100644 --- a/tests/component/test_rule_009.py +++ b/tests/component/test_rule_009.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed.vhd"), lExpected) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_010.py b/tests/component/test_rule_010.py index db45217b4..b56a26d6c 100644 --- a/tests/component/test_rule_010.py +++ b/tests/component/test_rule_010.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed_upper.vhd"), lExpected_upper) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_011.py b/tests/component/test_rule_011.py index 98ef8265d..70525d4cc 100644 --- a/tests/component/test_rule_011.py +++ b/tests/component/test_rule_011.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_011_test_input.fixed.vhd"), lExpected) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_012.py b/tests/component/test_rule_012.py index 5d0809bdd..c41490cf1 100644 --- a/tests/component/test_rule_012.py +++ b/tests/component/test_rule_012.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_012_test_input.fixed_upper.vhd"), lExpected_upper) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_013.py b/tests/component/test_rule_013.py index 91062edb6..766c3d710 100644 --- a/tests/component/test_rule_013.py +++ b/tests/component/test_rule_013.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_013_test_input.fixed.vhd"), lExpected) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_014.py b/tests/component/test_rule_014.py index c4ccd859d..0ee3df287 100644 --- a/tests/component/test_rule_014.py +++ b/tests/component/test_rule_014.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_014_test_input.fixed_upper.vhd"), lExpected_upper) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_016.py b/tests/component/test_rule_016.py index 59d3c7a2d..26b08266c 100644 --- a/tests/component/test_rule_016.py +++ b/tests/component/test_rule_016.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_016_test_input.fixed.vhd"), lExpected) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_017.py b/tests/component/test_rule_017.py index a4a1a3a5f..8d692c592 100644 --- a/tests/component/test_rule_017.py +++ b/tests/component/test_rule_017.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_017_test_input.vhd")) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_019.py b/tests/component/test_rule_019.py index fac0aa619..be1293a47 100644 --- a/tests/component/test_rule_019.py +++ b/tests/component/test_rule_019.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_019_test_input.fixed.vhd"), lExpected) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_020.py b/tests/component/test_rule_020.py index e730733a8..df729b7cc 100644 --- a/tests/component/test_rule_020.py +++ b/tests/component/test_rule_020.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_020_test_input.vhd")) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/component/test_rule_021.py b/tests/component/test_rule_021.py index d6d888f71..42c468867 100644 --- a/tests/component/test_rule_021.py +++ b/tests/component/test_rule_021.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_021_test_input.fixed_remove.vhd"), lExpected_remove) -class test_component_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/concurrent/test_rule_001.py b/tests/concurrent/test_rule_001.py index ac02dd7a6..ee7cb6ca6 100644 --- a/tests/concurrent/test_rule_001.py +++ b/tests/concurrent/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_concurrent_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/concurrent/test_rule_002.py b/tests/concurrent/test_rule_002.py index 9a7512f93..d2d5b662f 100644 --- a/tests/concurrent/test_rule_002.py +++ b/tests/concurrent/test_rule_002.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_concurrent_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/concurrent/test_rule_004.py b/tests/concurrent/test_rule_004.py index 33f618d8c..cfcc00b0f 100644 --- a/tests/concurrent/test_rule_004.py +++ b/tests/concurrent/test_rule_004.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected) -class test_concurrent_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/concurrent/test_rule_005.py b/tests/concurrent/test_rule_005.py index 5d58023cb..ace3b2121 100644 --- a/tests/concurrent/test_rule_005.py +++ b/tests/concurrent/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_concurrent_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/concurrent/test_rule_006.py b/tests/concurrent/test_rule_006.py index 3dd9e1a0e..987764040 100644 --- a/tests/concurrent/test_rule_006.py +++ b/tests/concurrent/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_concurrent_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/concurrent/test_rule_006_smart_tabs.py b/tests/concurrent/test_rule_006_smart_tabs.py index ee1780be0..9d320aaab 100644 --- a/tests/concurrent/test_rule_006_smart_tabs.py +++ b/tests/concurrent/test_rule_006_smart_tabs.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input_smart_tabs.fixed_indent_4.vhd"), lExpected_indent_4) -class test_concurrent_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/concurrent/test_rule_008.py b/tests/concurrent/test_rule_008.py index f8d738501..4c9796d73 100644 --- a/tests/concurrent/test_rule_008.py +++ b/tests/concurrent/test_rule_008.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_008_test_input.vhd")) -class test_concurrent_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/concurrent/test_rule_009.py b/tests/concurrent/test_rule_009.py index 8edf04811..7af18c3ae 100644 --- a/tests/concurrent/test_rule_009.py +++ b/tests/concurrent/test_rule_009.py @@ -256,7 +256,7 @@ ) -class test_concurrent_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/concurrent/test_rule_009_boolean.py b/tests/concurrent/test_rule_009_boolean.py index fdd1e5f6d..ec5777104 100644 --- a/tests/concurrent/test_rule_009_boolean.py +++ b/tests/concurrent/test_rule_009_boolean.py @@ -256,7 +256,7 @@ ) -class test_concurrent_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/concurrent/test_rule_009_smart_tabs.py b/tests/concurrent/test_rule_009_smart_tabs.py index 30e979efd..7678e9516 100644 --- a/tests/concurrent/test_rule_009_smart_tabs.py +++ b/tests/concurrent/test_rule_009_smart_tabs.py @@ -256,7 +256,7 @@ ) -class test_concurrent_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/concurrent/test_rule_010.py b/tests/concurrent/test_rule_010.py index 565547ac4..d99bf223e 100644 --- a/tests/concurrent/test_rule_010.py +++ b/tests/concurrent/test_rule_010.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed.vhd"), lExpected) -class test_concurrent_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/concurrent/test_rule_011.py b/tests/concurrent/test_rule_011.py index 7a5158e9c..bb4c07f41 100644 --- a/tests/concurrent/test_rule_011.py +++ b/tests/concurrent/test_rule_011.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_011_test_input.fixed_new_line_after_assign_no.vhd"), lExpected_new_line_after_assign_no) -class test_concurrent_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/concurrent/test_rule_012.py b/tests/concurrent/test_rule_012.py index 5f15a2a8d..dc6cede1c 100644 --- a/tests/concurrent/test_rule_012.py +++ b/tests/concurrent/test_rule_012.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_012_test_input.fixed.vhd"), lExpected) -class test_concurrent_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/concurrent/test_rule_400.py b/tests/concurrent/test_rule_400.py index b9f62f4ad..9f56a7408 100644 --- a/tests/concurrent/test_rule_400.py +++ b/tests/concurrent/test_rule_400.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_400_test_input.vhd")) -class test_concurrent_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/concurrent/test_rule_401.py b/tests/concurrent/test_rule_401.py index 3a825cf5c..c78fc1c12 100644 --- a/tests/concurrent/test_rule_401.py +++ b/tests/concurrent/test_rule_401.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_401_test_input.fixed.vhd"), lExpected) -class test_concurrent_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/conditional_expressions/test_rule_100.py b/tests/conditional_expressions/test_rule_100.py index 23af9ec63..3d416ee47 100644 --- a/tests/conditional_expressions/test_rule_100.py +++ b/tests/conditional_expressions/test_rule_100.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_conditional_expressions_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/conditional_expressions/test_rule_101.py b/tests/conditional_expressions/test_rule_101.py index d3d70f023..306acb44e 100644 --- a/tests/conditional_expressions/test_rule_101.py +++ b/tests/conditional_expressions/test_rule_101.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_conditional_expressions_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/conditional_expressions/test_rule_102.py b/tests/conditional_expressions/test_rule_102.py index 481c84372..c2c47f505 100644 --- a/tests/conditional_expressions/test_rule_102.py +++ b/tests/conditional_expressions/test_rule_102.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_102_test_input.fixed.vhd"), lExpected) -class test_conditional_expressions_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/conditional_expressions/test_rule_103.py b/tests/conditional_expressions/test_rule_103.py index c2bc17b24..fd270a415 100644 --- a/tests/conditional_expressions/test_rule_103.py +++ b/tests/conditional_expressions/test_rule_103.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_103_test_input.fixed.vhd"), lExpected) -class test_conditional_expressions_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/conditional_expressions/test_rule_500.py b/tests/conditional_expressions/test_rule_500.py index 57e94df5d..a862ea182 100644 --- a/tests/conditional_expressions/test_rule_500.py +++ b/tests/conditional_expressions/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_conditional_expressions_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/conditional_expressions/test_rule_501.py b/tests/conditional_expressions/test_rule_501.py index b5c78eded..352280e4c 100644 --- a/tests/conditional_expressions/test_rule_501.py +++ b/tests/conditional_expressions/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_conditional_expressions_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/conditional_waveforms/test_rule_100.py b/tests/conditional_waveforms/test_rule_100.py index fb7dd1d2b..ec67de1ea 100644 --- a/tests/conditional_waveforms/test_rule_100.py +++ b/tests/conditional_waveforms/test_rule_100.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_conditional_waveforms_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/conditional_waveforms/test_rule_101.py b/tests/conditional_waveforms/test_rule_101.py index 473204362..e403f4a96 100644 --- a/tests/conditional_waveforms/test_rule_101.py +++ b/tests/conditional_waveforms/test_rule_101.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_conditional_waveforms_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/conditional_waveforms/test_rule_102.py b/tests/conditional_waveforms/test_rule_102.py index c365d5114..23ff06e0d 100644 --- a/tests/conditional_waveforms/test_rule_102.py +++ b/tests/conditional_waveforms/test_rule_102.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_102_test_input.fixed.vhd"), lExpected) -class test_conditional_waveforms_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/conditional_waveforms/test_rule_103.py b/tests/conditional_waveforms/test_rule_103.py index 4e724d978..e621f2673 100644 --- a/tests/conditional_waveforms/test_rule_103.py +++ b/tests/conditional_waveforms/test_rule_103.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_103_test_input.fixed.vhd"), lExpected) -class test_conditional_waveforms_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/conditional_waveforms/test_rule_500.py b/tests/conditional_waveforms/test_rule_500.py index 7e0f08535..fec6c61af 100644 --- a/tests/conditional_waveforms/test_rule_500.py +++ b/tests/conditional_waveforms/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_conditional_waveforms_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/conditional_waveforms/test_rule_501.py b/tests/conditional_waveforms/test_rule_501.py index 76be8d9c3..95af2e54a 100644 --- a/tests/conditional_waveforms/test_rule_501.py +++ b/tests/conditional_waveforms/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_conditional_waveforms_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_001.py b/tests/constant/test_rule_001.py index 223a966b4..62f916033 100644 --- a/tests/constant/test_rule_001.py +++ b/tests/constant/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_002.py b/tests/constant/test_rule_002.py index 99f0ea17a..c295ee4fc 100644 --- a/tests/constant/test_rule_002.py +++ b/tests/constant/test_rule_002.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed_upper.vhd"), lExpected_upper) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_004.py b/tests/constant/test_rule_004.py index f19d3f205..33a2ef854 100644 --- a/tests/constant/test_rule_004.py +++ b/tests/constant/test_rule_004.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed_upper.vhd"), lExpected_upper) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_005.py b/tests/constant/test_rule_005.py index 4a1b9209c..8ff32ec9d 100644 --- a/tests/constant/test_rule_005.py +++ b/tests/constant/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_006.py b/tests/constant/test_rule_006.py index c27a69eb5..a3f39ab57 100644 --- a/tests/constant/test_rule_006.py +++ b/tests/constant/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_007.py b/tests/constant/test_rule_007.py index e9aff2b09..b480593a3 100644 --- a/tests/constant/test_rule_007.py +++ b/tests/constant/test_rule_007.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_010.py b/tests/constant/test_rule_010.py index df647cda4..554d9c196 100644 --- a/tests/constant/test_rule_010.py +++ b/tests/constant/test_rule_010.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed.vhd"), lExpected) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_012.py b/tests/constant/test_rule_012.py index 015da2c5d..fa0756c04 100644 --- a/tests/constant/test_rule_012.py +++ b/tests/constant/test_rule_012.py @@ -69,7 +69,7 @@ ) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_014.py b/tests/constant/test_rule_014.py index eb4e6c8af..b361cfbac 100644 --- a/tests/constant/test_rule_014.py +++ b/tests/constant/test_rule_014.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_014_test_input.fixed_align_left_true_align_paren_false.vhd"), lExpected_align_left_true_align_paren_false) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_015.py b/tests/constant/test_rule_015.py index 3a79bf773..c8d2e55b9 100644 --- a/tests/constant/test_rule_015.py +++ b/tests/constant/test_rule_015.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_015_test_input.vhd")) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_016.py b/tests/constant/test_rule_016.py index 20a9ce72d..42a2748b1 100644 --- a/tests/constant/test_rule_016.py +++ b/tests/constant/test_rule_016.py @@ -87,7 +87,7 @@ utils.read_file(os.path.join(sTestDir, "rule_016_test_input_positional.fixed.vhd"), lExpected_positional) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_016_boolean.py b/tests/constant/test_rule_016_boolean.py index c57650f7f..229aa5365 100644 --- a/tests/constant/test_rule_016_boolean.py +++ b/tests/constant/test_rule_016_boolean.py @@ -87,7 +87,7 @@ utils.read_file(os.path.join(sTestDir, "rule_016_test_input_positional.fixed.vhd"), lExpected_positional) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_100.py b/tests/constant/test_rule_100.py index dc525b683..37885ee6a 100644 --- a/tests/constant/test_rule_100.py +++ b/tests/constant/test_rule_100.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_101.py b/tests/constant/test_rule_101.py index 4866a2353..ee9eee366 100644 --- a/tests/constant/test_rule_101.py +++ b/tests/constant/test_rule_101.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_200.py b/tests/constant/test_rule_200.py index 08e8b794a..7dae26838 100644 --- a/tests/constant/test_rule_200.py +++ b/tests/constant/test_rule_200.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_200_test_input.fixed.vhd"), lExpected) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/constant/test_rule_600.py b/tests/constant/test_rule_600.py index 440512c5b..5a8ffe47f 100644 --- a/tests/constant/test_rule_600.py +++ b/tests/constant/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_constant_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_001.py b/tests/context/test_rule_001.py index c980387ae..4ab506931 100644 --- a/tests/context/test_rule_001.py +++ b/tests/context/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_002.py b/tests/context/test_rule_002.py index fa47772c6..18d635899 100644 --- a/tests/context/test_rule_002.py +++ b/tests/context/test_rule_002.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_003.py b/tests/context/test_rule_003.py index d39b70566..7ed7f0729 100644 --- a/tests/context/test_rule_003.py +++ b/tests/context/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_004.py b/tests/context/test_rule_004.py index 2184869e7..6761a9f91 100644 --- a/tests/context/test_rule_004.py +++ b/tests/context/test_rule_004.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed_upper.vhd"), lExpected_upper) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_005.py b/tests/context/test_rule_005.py index 24f01b9ca..86bf67a59 100644 --- a/tests/context/test_rule_005.py +++ b/tests/context/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected, False) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_006.py b/tests/context/test_rule_006.py index 468acbe6e..8adf4e442 100644 --- a/tests/context/test_rule_006.py +++ b/tests/context/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected, False) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_007.py b/tests/context/test_rule_007.py index 351b65379..bf383fe1c 100644 --- a/tests/context/test_rule_007.py +++ b/tests/context/test_rule_007.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_008.py b/tests/context/test_rule_008.py index fe2ebff40..581913039 100644 --- a/tests/context/test_rule_008.py +++ b/tests/context/test_rule_008.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed.vhd"), lExpected, False) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_009.py b/tests/context/test_rule_009.py index 3fc32c69f..d1462b813 100644 --- a/tests/context/test_rule_009.py +++ b/tests/context/test_rule_009.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed.vhd"), lExpected, False) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_010.py b/tests/context/test_rule_010.py index 103374d2c..97af3d508 100644 --- a/tests/context/test_rule_010.py +++ b/tests/context/test_rule_010.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed.vhd"), lExpected, False) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_011.py b/tests/context/test_rule_011.py index 29b2cdb8c..5845bb5b9 100644 --- a/tests/context/test_rule_011.py +++ b/tests/context/test_rule_011.py @@ -17,7 +17,7 @@ lExpected.append("") -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_012.py b/tests/context/test_rule_012.py index c2a2c5716..b3f259eac 100644 --- a/tests/context/test_rule_012.py +++ b/tests/context/test_rule_012.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_012_test_input.fixed_upper.vhd"), lExpected_upper) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_013.py b/tests/context/test_rule_013.py index e93902f58..5871cea8f 100644 --- a/tests/context/test_rule_013.py +++ b/tests/context/test_rule_013.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_013_test_input.fixed_upper.vhd"), lExpected_upper) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_014.py b/tests/context/test_rule_014.py index 8cd34613d..bd5b54d45 100644 --- a/tests/context/test_rule_014.py +++ b/tests/context/test_rule_014.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_014_test_input.fixed_upper.vhd"), lExpected_upper) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_015.py b/tests/context/test_rule_015.py index c03725169..fc2eeee6b 100644 --- a/tests/context/test_rule_015.py +++ b/tests/context/test_rule_015.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_015_test_input.fixed_upper.vhd"), lExpected_upper) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_016.py b/tests/context/test_rule_016.py index d4fde129c..df1aeb605 100644 --- a/tests/context/test_rule_016.py +++ b/tests/context/test_rule_016.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_016_test_input.fixed_upper.vhd"), lExpected_upper) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_017.py b/tests/context/test_rule_017.py index c35d5e191..4986e469f 100644 --- a/tests/context/test_rule_017.py +++ b/tests/context/test_rule_017.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_017_test_input.fixed.vhd"), lExpected) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_018.py b/tests/context/test_rule_018.py index 66836d38f..cf5feac45 100644 --- a/tests/context/test_rule_018.py +++ b/tests/context/test_rule_018.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_018_test_input.fixed.vhd"), lExpected) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_019.py b/tests/context/test_rule_019.py index 309d6c6a8..c6093e0b8 100644 --- a/tests/context/test_rule_019.py +++ b/tests/context/test_rule_019.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_019_test_input.fixed.vhd"), lExpected) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_020.py b/tests/context/test_rule_020.py index da8bb4d67..8a89d6388 100644 --- a/tests/context/test_rule_020.py +++ b/tests/context/test_rule_020.py @@ -17,7 +17,7 @@ utils.read_file(os.path.join(sTestDir, "rule_020_test_input.fixed.vhd"), lExpected) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_021.py b/tests/context/test_rule_021.py index 698209b7a..4bfb9e69c 100644 --- a/tests/context/test_rule_021.py +++ b/tests/context/test_rule_021.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_021_test_input.fixed_remove.vhd"), lExpected_remove) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_022.py b/tests/context/test_rule_022.py index 917aa8ba1..56dc6b64a 100644 --- a/tests/context/test_rule_022.py +++ b/tests/context/test_rule_022.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_022_test_input.fixed_remove.vhd"), lExpected_remove) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_023.py b/tests/context/test_rule_023.py index c5bd35d55..58f2bec8e 100644 --- a/tests/context/test_rule_023.py +++ b/tests/context/test_rule_023.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_023_test_input.fixed.vhd"), lExpected) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_024.py b/tests/context/test_rule_024.py index fde84b417..7da88cbaa 100644 --- a/tests/context/test_rule_024.py +++ b/tests/context/test_rule_024.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_024_test_input.fixed.vhd"), lExpected) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context/test_rule_025.py b/tests/context/test_rule_025.py index 34c2b6b03..62d42a24d 100644 --- a/tests/context/test_rule_025.py +++ b/tests/context/test_rule_025.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_025_test_input.fixed.vhd"), lExpected) -class test_context_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context_ref/test_rule_001.py b/tests/context_ref/test_rule_001.py index b03370ddc..0fba5481e 100644 --- a/tests/context_ref/test_rule_001.py +++ b/tests/context_ref/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_context_ref_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context_ref/test_rule_002.py b/tests/context_ref/test_rule_002.py index 1c8021d68..99243fc15 100644 --- a/tests/context_ref/test_rule_002.py +++ b/tests/context_ref/test_rule_002.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_context_ref_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context_ref/test_rule_003.py b/tests/context_ref/test_rule_003.py index 5169564cf..fc502af7e 100644 --- a/tests/context_ref/test_rule_003.py +++ b/tests/context_ref/test_rule_003.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed_upper.vhd"), lExpected_upper) -class test_context_ref_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context_ref/test_rule_005.py b/tests/context_ref/test_rule_005.py index f56898e3a..3766c87d5 100644 --- a/tests/context_ref/test_rule_005.py +++ b/tests/context_ref/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_context_ref_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context_ref/test_rule_500.py b/tests/context_ref/test_rule_500.py index 382080d2f..55b6016f9 100644 --- a/tests/context_ref/test_rule_500.py +++ b/tests/context_ref/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_context_ref_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/context_ref/test_rule_501.py b/tests/context_ref/test_rule_501.py index ad3befe43..651d00c16 100644 --- a/tests/context_ref/test_rule_501.py +++ b/tests/context_ref/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_context_ref_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/delay_mechanism/test_rule_500.py b/tests/delay_mechanism/test_rule_500.py index ce1a66e66..a46c9a4bc 100644 --- a/tests/delay_mechanism/test_rule_500.py +++ b/tests/delay_mechanism/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_delay_mechanism_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/delay_mechanism/test_rule_501.py b/tests/delay_mechanism/test_rule_501.py index 274d7a0ca..aac792c65 100644 --- a/tests/delay_mechanism/test_rule_501.py +++ b/tests/delay_mechanism/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_delay_mechanism_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/delay_mechanism/test_rule_502.py b/tests/delay_mechanism/test_rule_502.py index 550f8bfb5..0544bee93 100644 --- a/tests/delay_mechanism/test_rule_502.py +++ b/tests/delay_mechanism/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_delay_mechanism_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/element_association/test_rule_100.py b/tests/element_association/test_rule_100.py index 2c18522d9..7f4ef0c86 100644 --- a/tests/element_association/test_rule_100.py +++ b/tests/element_association/test_rule_100.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed_spaces_gte2.vhd"), lExpected_spaces_gte2) -class test_element_association_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/element_association/test_rule_101.py b/tests/element_association/test_rule_101.py index fdf260b2c..761b3c137 100644 --- a/tests/element_association/test_rule_101.py +++ b/tests/element_association/test_rule_101.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_element_association_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_001.py b/tests/entity/test_rule_001.py index fabadb9f3..c4c613003 100644 --- a/tests/entity/test_rule_001.py +++ b/tests/entity/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_002.py b/tests/entity/test_rule_002.py index b336d17a4..6e4ef87ec 100644 --- a/tests/entity/test_rule_002.py +++ b/tests/entity/test_rule_002.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_003.py b/tests/entity/test_rule_003.py index 0b289ddc3..bac2ca26c 100644 --- a/tests/entity/test_rule_003.py +++ b/tests/entity/test_rule_003.py @@ -28,7 +28,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed_require_comment.vhd"), lExpected_require_comment) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_004.py b/tests/entity/test_rule_004.py index d678db2ac..436b2228c 100644 --- a/tests/entity/test_rule_004.py +++ b/tests/entity/test_rule_004.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed_upper.vhd"), lExpected_upper) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_005.py b/tests/entity/test_rule_005.py index 2c77da717..0e3f47379 100644 --- a/tests/entity/test_rule_005.py +++ b/tests/entity/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_006.py b/tests/entity/test_rule_006.py index ff094c661..ef834c102 100644 --- a/tests/entity/test_rule_006.py +++ b/tests/entity/test_rule_006.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed_upper.vhd"), lExpected_upper) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_007.py b/tests/entity/test_rule_007.py index 59d5c5771..93f03b3cc 100644 --- a/tests/entity/test_rule_007.py +++ b/tests/entity/test_rule_007.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_008.py b/tests/entity/test_rule_008.py index c7491b51c..c6ed6fbda 100644 --- a/tests/entity/test_rule_008.py +++ b/tests/entity/test_rule_008.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_008_test_input.vhd")) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_009.py b/tests/entity/test_rule_009.py index 5e5f7646f..dc4ca0149 100644 --- a/tests/entity/test_rule_009.py +++ b/tests/entity/test_rule_009.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_010.py b/tests/entity/test_rule_010.py index e464e918d..25c8c6915 100644 --- a/tests/entity/test_rule_010.py +++ b/tests/entity/test_rule_010.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed_upper.vhd"), lExpected_upper) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_011.py b/tests/entity/test_rule_011.py index 6a55b05d5..3c0f5b176 100644 --- a/tests/entity/test_rule_011.py +++ b/tests/entity/test_rule_011.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_011_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_012.py b/tests/entity/test_rule_012.py index aa8e33573..475fb8005 100644 --- a/tests/entity/test_rule_012.py +++ b/tests/entity/test_rule_012.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_012_test_input.fixed_upper.vhd"), lExpected_upper) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_013.py b/tests/entity/test_rule_013.py index 259208808..7bac4b3bf 100644 --- a/tests/entity/test_rule_013.py +++ b/tests/entity/test_rule_013.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_013_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_014.py b/tests/entity/test_rule_014.py index bcccafb30..d22b04aca 100644 --- a/tests/entity/test_rule_014.py +++ b/tests/entity/test_rule_014.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_014_test_input.fixed_upper.vhd"), lExpected_upper) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_015.py b/tests/entity/test_rule_015.py index 58af8a4dc..84ac934fd 100644 --- a/tests/entity/test_rule_015.py +++ b/tests/entity/test_rule_015.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_015_test_input.fixed_remove.vhd"), lExpected_remove) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_016.py b/tests/entity/test_rule_016.py index 283430324..54b224de1 100644 --- a/tests/entity/test_rule_016.py +++ b/tests/entity/test_rule_016.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_016_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_017.py b/tests/entity/test_rule_017.py index 1959ce85e..eef3168da 100644 --- a/tests/entity/test_rule_017.py +++ b/tests/entity/test_rule_017.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_017_test_input.vhd")) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_018.py b/tests/entity/test_rule_018.py index 83213160e..91deeb122 100644 --- a/tests/entity/test_rule_018.py +++ b/tests/entity/test_rule_018.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_018_test_input.vhd")) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_019.py b/tests/entity/test_rule_019.py index 1066dddf3..2f7952aca 100644 --- a/tests/entity/test_rule_019.py +++ b/tests/entity/test_rule_019.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_019_test_input.fixed_remove.vhd"), lExpected_remove) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_020.py b/tests/entity/test_rule_020.py index 193c88670..cf32dad56 100644 --- a/tests/entity/test_rule_020.py +++ b/tests/entity/test_rule_020.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_020_test_input.vhd")) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_021.py b/tests/entity/test_rule_021.py index da5bdd8f5..df6c91f46 100644 --- a/tests/entity/test_rule_021.py +++ b/tests/entity/test_rule_021.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_021_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_022.py b/tests/entity/test_rule_022.py index 9664bb81f..6347a4c00 100644 --- a/tests/entity/test_rule_022.py +++ b/tests/entity/test_rule_022.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_022_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_023.py b/tests/entity/test_rule_023.py index e3c3ba8df..1e9ebd1b6 100644 --- a/tests/entity/test_rule_023.py +++ b/tests/entity/test_rule_023.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_023_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_024.py b/tests/entity/test_rule_024.py index edc163c59..2ff7df65f 100644 --- a/tests/entity/test_rule_024.py +++ b/tests/entity/test_rule_024.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_024_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_025.py b/tests/entity/test_rule_025.py index 49116f3df..b8f9bd096 100644 --- a/tests/entity/test_rule_025.py +++ b/tests/entity/test_rule_025.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_025_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_026.py b/tests/entity/test_rule_026.py index a595e19b4..c07617d10 100644 --- a/tests/entity/test_rule_026.py +++ b/tests/entity/test_rule_026.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_026_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_027.py b/tests/entity/test_rule_027.py index b93158cf5..d1b61d7ec 100644 --- a/tests/entity/test_rule_027.py +++ b/tests/entity/test_rule_027.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_027_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_028.py b/tests/entity/test_rule_028.py index a422e7a88..bb3f47cfd 100644 --- a/tests/entity/test_rule_028.py +++ b/tests/entity/test_rule_028.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_028_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_029.py b/tests/entity/test_rule_029.py index 2345d98b9..4bc655d46 100644 --- a/tests/entity/test_rule_029.py +++ b/tests/entity/test_rule_029.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_029_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_200.py b/tests/entity/test_rule_200.py index 77f7ea413..51943ebb6 100644 --- a/tests/entity/test_rule_200.py +++ b/tests/entity/test_rule_200.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_200_test_input.fixed.vhd"), lExpected) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_201.py b/tests/entity/test_rule_201.py index dfaeae271..710e682b9 100644 --- a/tests/entity/test_rule_201.py +++ b/tests/entity/test_rule_201.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_201_test_input.fixed.vhd"), lExpected) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_202.py b/tests/entity/test_rule_202.py index 97bcf49f1..560fce727 100644 --- a/tests/entity/test_rule_202.py +++ b/tests/entity/test_rule_202.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_202_test_input.fixed.vhd"), lExpected) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_203.py b/tests/entity/test_rule_203.py index b319a6c9d..da1bd798a 100644 --- a/tests/entity/test_rule_203.py +++ b/tests/entity/test_rule_203.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_203_test_input.fixed.vhd"), lExpected) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_300.py b/tests/entity/test_rule_300.py index 75f36d4c2..7e93f65bf 100644 --- a/tests/entity/test_rule_300.py +++ b/tests/entity/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity/test_rule_500.py b/tests/entity/test_rule_500.py index 18aa77460..36bf4c4c1 100644 --- a/tests/entity/test_rule_500.py +++ b/tests/entity/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_entity_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity_specification/test_rule_100.py b/tests/entity_specification/test_rule_100.py index accee0f8a..5229e6c0c 100644 --- a/tests/entity_specification/test_rule_100.py +++ b/tests/entity_specification/test_rule_100.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected, False) -class test_entity_specification_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity_specification/test_rule_101.py b/tests/entity_specification/test_rule_101.py index 67c37ceb1..2975088ec 100644 --- a/tests/entity_specification/test_rule_101.py +++ b/tests/entity_specification/test_rule_101.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected, False) -class test_entity_specification_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity_specification/test_rule_500.py b/tests/entity_specification/test_rule_500.py index c55acd4ec..64a46f971 100644 --- a/tests/entity_specification/test_rule_500.py +++ b/tests/entity_specification/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_entity_specification_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity_specification/test_rule_501.py b/tests/entity_specification/test_rule_501.py index 44846a302..ba70cf746 100644 --- a/tests/entity_specification/test_rule_501.py +++ b/tests/entity_specification/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_entity_specification_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/entity_specification/test_rule_503.py b/tests/entity_specification/test_rule_503.py index c973d0503..af2869944 100644 --- a/tests/entity_specification/test_rule_503.py +++ b/tests/entity_specification/test_rule_503.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_503_test_input.fixed_upper.vhd"), lExpected_upper) -class test_entity_specification_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/exit_statement/test_rule_300.py b/tests/exit_statement/test_rule_300.py index 9d9b64c6f..26ab0d31e 100644 --- a/tests/exit_statement/test_rule_300.py +++ b/tests/exit_statement/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected, False) -class test_exit_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/exit_statement/test_rule_301.py b/tests/exit_statement/test_rule_301.py index 18b23c86d..6c13ac210 100644 --- a/tests/exit_statement/test_rule_301.py +++ b/tests/exit_statement/test_rule_301.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_301_test_input.fixed.vhd"), lExpected, False) -class test_exit_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/exit_statement/test_rule_500.py b/tests/exit_statement/test_rule_500.py index 3b35ae137..57c56a94f 100644 --- a/tests/exit_statement/test_rule_500.py +++ b/tests/exit_statement/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_exit_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/exit_statement/test_rule_501.py b/tests/exit_statement/test_rule_501.py index 9fed40a2f..b1f90050b 100644 --- a/tests/exit_statement/test_rule_501.py +++ b/tests/exit_statement/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_exit_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/exponent/test_rule_500.py b/tests/exponent/test_rule_500.py index 452c84734..b02c613de 100644 --- a/tests/exponent/test_rule_500.py +++ b/tests/exponent/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_exponent_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/file_statement/test_rule_001.py b/tests/file_statement/test_rule_001.py index e6da158cb..e4a2c5251 100644 --- a/tests/file_statement/test_rule_001.py +++ b/tests/file_statement/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_file_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/file_statement/test_rule_002.py b/tests/file_statement/test_rule_002.py index cf2b8eb9e..9004cc15a 100644 --- a/tests/file_statement/test_rule_002.py +++ b/tests/file_statement/test_rule_002.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed_upper.vhd"), lExpected_upper) -class test_file_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/file_statement/test_rule_100.py b/tests/file_statement/test_rule_100.py index f4d26ddb3..68c52effe 100644 --- a/tests/file_statement/test_rule_100.py +++ b/tests/file_statement/test_rule_100.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_file_declaration_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/file_statement/test_rule_500.py b/tests/file_statement/test_rule_500.py index 7fb510a1c..0d8b94561 100644 --- a/tests/file_statement/test_rule_500.py +++ b/tests/file_statement/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_file_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/for_generate_statement/test_rule_500.py b/tests/for_generate_statement/test_rule_500.py index 7f7bdff5a..34210aefc 100644 --- a/tests/for_generate_statement/test_rule_500.py +++ b/tests/for_generate_statement/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_for_generate_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/for_generate_statement/test_rule_501.py b/tests/for_generate_statement/test_rule_501.py index 93042c25b..f5b78d6c8 100644 --- a/tests/for_generate_statement/test_rule_501.py +++ b/tests/for_generate_statement/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_for_generate_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_001.py b/tests/function/test_rule_001.py index 072abe263..11e0c03bb 100644 --- a/tests/function/test_rule_001.py +++ b/tests/function/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_004.py b/tests/function/test_rule_004.py index 7ed3f2029..f9e425561 100644 --- a/tests/function/test_rule_004.py +++ b/tests/function/test_rule_004.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed_upper.vhd"), lExpected_upper) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_005.py b/tests/function/test_rule_005.py index 575be1402..08d440ea1 100644 --- a/tests/function/test_rule_005.py +++ b/tests/function/test_rule_005.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed_upper.vhd"), lExpected_upper) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_006.py b/tests/function/test_rule_006.py index fed77c85c..aa72ab43b 100644 --- a/tests/function/test_rule_006.py +++ b/tests/function/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_008.py b/tests/function/test_rule_008.py index 50203ab9f..801ac841d 100644 --- a/tests/function/test_rule_008.py +++ b/tests/function/test_rule_008.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed.vhd"), lExpected) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_012.py b/tests/function/test_rule_012.py index 4a6f020ae..d80a271e9 100644 --- a/tests/function/test_rule_012.py +++ b/tests/function/test_rule_012.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_012_test_input.fixed.vhd"), lExpected) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_013.py b/tests/function/test_rule_013.py index b78a70f60..a8df44579 100644 --- a/tests/function/test_rule_013.py +++ b/tests/function/test_rule_013.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_013_test_input.fixed_upper.vhd"), lExpected_upper) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_015.py b/tests/function/test_rule_015.py index a40f62625..df8ac7003 100644 --- a/tests/function/test_rule_015.py +++ b/tests/function/test_rule_015.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_015_test_input.fixed.vhd"), lExpected) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_016.py b/tests/function/test_rule_016.py index 2f1311288..09f750939 100644 --- a/tests/function/test_rule_016.py +++ b/tests/function/test_rule_016.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_016_test_input.fixed.vhd"), lExpected) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_017.py b/tests/function/test_rule_017.py index 94597e951..cfdfb8a24 100644 --- a/tests/function/test_rule_017.py +++ b/tests/function/test_rule_017.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_017_test_input.fixed_upper.vhd"), lExpected_upper) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_018.py b/tests/function/test_rule_018.py index 890cc419b..3303a292c 100644 --- a/tests/function/test_rule_018.py +++ b/tests/function/test_rule_018.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_018_test_input.vhd")) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_020.py b/tests/function/test_rule_020.py index f414490a3..20388ae9c 100644 --- a/tests/function/test_rule_020.py +++ b/tests/function/test_rule_020.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_020_test_input.vhd")) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_100.py b/tests/function/test_rule_100.py index 3f11a1baa..07d65c754 100644 --- a/tests/function/test_rule_100.py +++ b/tests/function/test_rule_100.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_101.py b/tests/function/test_rule_101.py index 6259886f9..58f981228 100644 --- a/tests/function/test_rule_101.py +++ b/tests/function/test_rule_101.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_300.py b/tests/function/test_rule_300.py index efa101351..5a4ecd1c2 100644 --- a/tests/function/test_rule_300.py +++ b/tests/function/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_501.py b/tests/function/test_rule_501.py index d178d3bf3..c627578b2 100644 --- a/tests/function/test_rule_501.py +++ b/tests/function/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_502.py b/tests/function/test_rule_502.py index c423ce03d..70b9e072b 100644 --- a/tests/function/test_rule_502.py +++ b/tests/function/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_506.py b/tests/function/test_rule_506.py index 3abf768ae..ce07c3c76 100644 --- a/tests/function/test_rule_506.py +++ b/tests/function/test_rule_506.py @@ -36,7 +36,7 @@ utils.read_file(os.path.join(sTestDir, "rule_506_test_input.fixed_upper_with_lower_suffix.vhd"), lExpected_upper_with_lower_suffix) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_507.py b/tests/function/test_rule_507.py index 1ee5e5bd8..de597be65 100644 --- a/tests/function/test_rule_507.py +++ b/tests/function/test_rule_507.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_507_test_input.fixed_upper.vhd"), lExpected_upper) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_508.py b/tests/function/test_rule_508.py index 0664b2522..4fc080246 100644 --- a/tests/function/test_rule_508.py +++ b/tests/function/test_rule_508.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_508_test_input.fixed.vhd"), lExpected) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_509.py b/tests/function/test_rule_509.py index e5d2d4cfa..fcc4aa974 100644 --- a/tests/function/test_rule_509.py +++ b/tests/function/test_rule_509.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_509_test_input.fixed_upper.vhd"), lExpected_upper) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_510.py b/tests/function/test_rule_510.py index 399ff5b1a..89edbdcf4 100644 --- a/tests/function/test_rule_510.py +++ b/tests/function/test_rule_510.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_510_test_input.fixed_upper.vhd"), lExpected_upper) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_511.py b/tests/function/test_rule_511.py index 828e7eda7..c39f2ebfb 100644 --- a/tests/function/test_rule_511.py +++ b/tests/function/test_rule_511.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_511_test_input.fixed_upper.vhd"), lExpected_upper) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_512.py b/tests/function/test_rule_512.py index 4228fbd86..ba9216f12 100644 --- a/tests/function/test_rule_512.py +++ b/tests/function/test_rule_512.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_512_test_input.fixed_upper.vhd"), lExpected_upper) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_600.py b/tests/function/test_rule_600.py index 8d4245caf..321cfc05d 100644 --- a/tests/function/test_rule_600.py +++ b/tests/function/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/function/test_rule_601.py b/tests/function/test_rule_601.py index 7a96079c6..477b15a64 100644 --- a/tests/function/test_rule_601.py +++ b/tests/function/test_rule_601.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_601_test_input.vhd")) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_001.py b/tests/generate/test_rule_001.py index d6f346e68..6b78e2829 100644 --- a/tests/generate/test_rule_001.py +++ b/tests/generate/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_002.py b/tests/generate/test_rule_002.py index 1396f1b67..0866aa07f 100644 --- a/tests/generate/test_rule_002.py +++ b/tests/generate/test_rule_002.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed_w_0_spaces.vhd"), lExpected_w_0_spaces) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_003.py b/tests/generate/test_rule_003.py index dc68b229d..ca832eeef 100644 --- a/tests/generate/test_rule_003.py +++ b/tests/generate/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_004.py b/tests/generate/test_rule_004.py index 6c7ad4f87..7da7dcf45 100644 --- a/tests/generate/test_rule_004.py +++ b/tests/generate/test_rule_004.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_005.py b/tests/generate/test_rule_005.py index e92948804..a82406fd3 100644 --- a/tests/generate/test_rule_005.py +++ b/tests/generate/test_rule_005.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed_upper.vhd"), lExpected_upper) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_006.py b/tests/generate/test_rule_006.py index e8d95d57a..017db335c 100644 --- a/tests/generate/test_rule_006.py +++ b/tests/generate/test_rule_006.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_007.py b/tests/generate/test_rule_007.py index 903736253..2471a193f 100644 --- a/tests/generate/test_rule_007.py +++ b/tests/generate/test_rule_007.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_008.py b/tests/generate/test_rule_008.py index c3284cd43..80c2f94f8 100644 --- a/tests/generate/test_rule_008.py +++ b/tests/generate/test_rule_008.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_009.py b/tests/generate/test_rule_009.py index c8a3de156..f54eff284 100644 --- a/tests/generate/test_rule_009.py +++ b/tests/generate/test_rule_009.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed_upper.vhd"), lExpected_upper) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_010.py b/tests/generate/test_rule_010.py index 5f98b71c0..d0ba45e4f 100644 --- a/tests/generate/test_rule_010.py +++ b/tests/generate/test_rule_010.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed_upper.vhd"), lExpected_upper) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_011.py b/tests/generate/test_rule_011.py index 3586634ae..d0de1b928 100644 --- a/tests/generate/test_rule_011.py +++ b/tests/generate/test_rule_011.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_011_test_input.fixed_remove.vhd"), lExpected_remove) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_012.py b/tests/generate/test_rule_012.py index 780217eed..0fce67cd7 100644 --- a/tests/generate/test_rule_012.py +++ b/tests/generate/test_rule_012.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_012_test_input.fixed_upper.vhd"), lExpected_upper) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_013.py b/tests/generate/test_rule_013.py index b8a3fe4eb..402c03f19 100644 --- a/tests/generate/test_rule_013.py +++ b/tests/generate/test_rule_013.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_013_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_014.py b/tests/generate/test_rule_014.py index 12ceb6e46..b7e03d922 100644 --- a/tests/generate/test_rule_014.py +++ b/tests/generate/test_rule_014.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_014_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_016.py b/tests/generate/test_rule_016.py index 9f9bf5cf0..33bc73890 100644 --- a/tests/generate/test_rule_016.py +++ b/tests/generate/test_rule_016.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_016_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_017.py b/tests/generate/test_rule_017.py index bf971e3c0..d6f995aa0 100644 --- a/tests/generate/test_rule_017.py +++ b/tests/generate/test_rule_017.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_017_test_input.vhd")) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_018.py b/tests/generate/test_rule_018.py index 0200dc6f8..0ef343884 100644 --- a/tests/generate/test_rule_018.py +++ b/tests/generate/test_rule_018.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_018_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_019.py b/tests/generate/test_rule_019.py index 45c5aa234..4caa8a938 100644 --- a/tests/generate/test_rule_019.py +++ b/tests/generate/test_rule_019.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_019_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_020.py b/tests/generate/test_rule_020.py index 9b1f47bf9..92e365046 100644 --- a/tests/generate/test_rule_020.py +++ b/tests/generate/test_rule_020.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_020_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_021.py b/tests/generate/test_rule_021.py index 8170b8af6..12da3f377 100644 --- a/tests/generate/test_rule_021.py +++ b/tests/generate/test_rule_021.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_021_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_400.py b/tests/generate/test_rule_400.py index 741c75e56..33779a3d2 100644 --- a/tests/generate/test_rule_400.py +++ b/tests/generate/test_rule_400.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_400_test_input.vhd")) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_401.py b/tests/generate/test_rule_401.py index 60b7332d7..734fd329a 100644 --- a/tests/generate/test_rule_401.py +++ b/tests/generate/test_rule_401.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_401_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_402.py b/tests/generate/test_rule_402.py index 0f38bb00b..b89daae06 100644 --- a/tests/generate/test_rule_402.py +++ b/tests/generate/test_rule_402.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_402_test_input.vhd")) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_403.py b/tests/generate/test_rule_403.py index e32160c66..53b57b681 100644 --- a/tests/generate/test_rule_403.py +++ b/tests/generate/test_rule_403.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_403_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_404.py b/tests/generate/test_rule_404.py index 0a64b53f3..0ea5c042c 100644 --- a/tests/generate/test_rule_404.py +++ b/tests/generate/test_rule_404.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_404_test_input.vhd")) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_405.py b/tests/generate/test_rule_405.py index ea5e6dfb9..ec95fdece 100644 --- a/tests/generate/test_rule_405.py +++ b/tests/generate/test_rule_405.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_405_test_input.fixed.vhd"), lExpected) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_500.py b/tests/generate/test_rule_500.py index c987918d8..0f828207d 100644 --- a/tests/generate/test_rule_500.py +++ b/tests/generate/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_501.py b/tests/generate/test_rule_501.py index 05c3e7c35..763d3eb87 100644 --- a/tests/generate/test_rule_501.py +++ b/tests/generate/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generate/test_rule_600.py b/tests/generate/test_rule_600.py index 2667c55c1..cc32b800a 100644 --- a/tests/generate/test_rule_600.py +++ b/tests/generate/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_generate_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic/test_rule_002.py b/tests/generic/test_rule_002.py index a337dfd34..0baee5599 100644 --- a/tests/generic/test_rule_002.py +++ b/tests/generic/test_rule_002.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic/test_rule_003.py b/tests/generic/test_rule_003.py index ff229491e..54d4315da 100644 --- a/tests/generic/test_rule_003.py +++ b/tests/generic/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic/test_rule_004.py b/tests/generic/test_rule_004.py index b95924d0c..99f3e2d78 100644 --- a/tests/generic/test_rule_004.py +++ b/tests/generic/test_rule_004.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic/test_rule_005.py b/tests/generic/test_rule_005.py index 89bf58b7c..3e3736ceb 100644 --- a/tests/generic/test_rule_005.py +++ b/tests/generic/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic/test_rule_006.py b/tests/generic/test_rule_006.py index 75e61535e..e78a835af 100644 --- a/tests/generic/test_rule_006.py +++ b/tests/generic/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic/test_rule_008.py b/tests/generic/test_rule_008.py index fed9d6aed..051e051db 100644 --- a/tests/generic/test_rule_008.py +++ b/tests/generic/test_rule_008.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed.vhd"), lExpected) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic/test_rule_009.py b/tests/generic/test_rule_009.py index f7ab6d082..7b6cf25c6 100644 --- a/tests/generic/test_rule_009.py +++ b/tests/generic/test_rule_009.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed_upper.vhd"), lExpected_upper) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic/test_rule_010.py b/tests/generic/test_rule_010.py index 627860358..e42479f88 100644 --- a/tests/generic/test_rule_010.py +++ b/tests/generic/test_rule_010.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed_move_left.vhd"), lExpected_move_left) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic/test_rule_013.py b/tests/generic/test_rule_013.py index 5b64545c2..3b6d050e7 100644 --- a/tests/generic/test_rule_013.py +++ b/tests/generic/test_rule_013.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_013_test_input.fixed.vhd"), lExpected) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic/test_rule_014.py b/tests/generic/test_rule_014.py index aba0f1cf1..02a08f812 100644 --- a/tests/generic/test_rule_014.py +++ b/tests/generic/test_rule_014.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_014_test_input.fixed.vhd"), lExpected) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic/test_rule_016.py b/tests/generic/test_rule_016.py index 9cea1cc1e..f8512421f 100644 --- a/tests/generic/test_rule_016.py +++ b/tests/generic/test_rule_016.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_016_test_input.fixed.vhd"), lExpected) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic/test_rule_018.py b/tests/generic/test_rule_018.py index 3a759357c..13db3b860 100644 --- a/tests/generic/test_rule_018.py +++ b/tests/generic/test_rule_018.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_018_test_input.fixed.vhd"), lExpected, False) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic/test_rule_019.py b/tests/generic/test_rule_019.py index b8f7dfc4d..20c95b537 100644 --- a/tests/generic/test_rule_019.py +++ b/tests/generic/test_rule_019.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_019_test_input.fixed.vhd"), lExpected, False) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic/test_rule_021.py b/tests/generic/test_rule_021.py index c8549e3fc..120af639f 100644 --- a/tests/generic/test_rule_021.py +++ b/tests/generic/test_rule_021.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_021_test_input.fixed.vhd"), lExpected) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic/test_rule_600.py b/tests/generic/test_rule_600.py index a8eea2c6b..96c62a52f 100644 --- a/tests/generic/test_rule_600.py +++ b/tests/generic/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_generic_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic_map/test_rule_001.py b/tests/generic_map/test_rule_001.py index 278911ff0..934ecbf99 100644 --- a/tests/generic_map/test_rule_001.py +++ b/tests/generic_map/test_rule_001.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed_upper.vhd"), lExpected_upper) -class test_generic_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic_map/test_rule_002.py b/tests/generic_map/test_rule_002.py index ebee76db1..a2a540de8 100644 --- a/tests/generic_map/test_rule_002.py +++ b/tests/generic_map/test_rule_002.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed_upper.vhd"), lExpected_upper) -class test_generic_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic_map/test_rule_003.py b/tests/generic_map/test_rule_003.py index 97fe9cb57..a0281bcfa 100644 --- a/tests/generic_map/test_rule_003.py +++ b/tests/generic_map/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected, False) -class test_generic_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic_map/test_rule_004.py b/tests/generic_map/test_rule_004.py index 7ed415725..3bd499c5c 100644 --- a/tests/generic_map/test_rule_004.py +++ b/tests/generic_map/test_rule_004.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected) -class test_generic_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic_map/test_rule_005.py b/tests/generic_map/test_rule_005.py index 9bbc3f897..eba84a0e5 100644 --- a/tests/generic_map/test_rule_005.py +++ b/tests/generic_map/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_generic_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic_map/test_rule_006.py b/tests/generic_map/test_rule_006.py index f9f456d7c..867378cd2 100644 --- a/tests/generic_map/test_rule_006.py +++ b/tests/generic_map/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_generic_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic_map/test_rule_007.py b/tests/generic_map/test_rule_007.py index b624fd475..54088beb1 100644 --- a/tests/generic_map/test_rule_007.py +++ b/tests/generic_map/test_rule_007.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected) -class test_generic_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic_map/test_rule_008.py b/tests/generic_map/test_rule_008.py index f1901965a..aa494a7b7 100644 --- a/tests/generic_map/test_rule_008.py +++ b/tests/generic_map/test_rule_008.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_008_test_input.vhd")) -class test_generic_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic_map/test_rule_009.py b/tests/generic_map/test_rule_009.py index c9acc39bc..5e8317bc4 100644 --- a/tests/generic_map/test_rule_009.py +++ b/tests/generic_map/test_rule_009.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed.vhd"), lExpected, False) -class test_generic_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic_map/test_rule_101.py b/tests/generic_map/test_rule_101.py index d3f8ab4b3..99ed9207e 100644 --- a/tests/generic_map/test_rule_101.py +++ b/tests/generic_map/test_rule_101.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_generic_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic_map/test_rule_300.py b/tests/generic_map/test_rule_300.py index b57913501..93399f8fb 100644 --- a/tests/generic_map/test_rule_300.py +++ b/tests/generic_map/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_generic_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic_map/test_rule_301.py b/tests/generic_map/test_rule_301.py index 1b1eefc17..c02001684 100644 --- a/tests/generic_map/test_rule_301.py +++ b/tests/generic_map/test_rule_301.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_301_test_input.fixed.vhd"), lExpected) -class test_generic_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic_map/test_rule_302.py b/tests/generic_map/test_rule_302.py index 6252a0048..a868e7f7e 100644 --- a/tests/generic_map/test_rule_302.py +++ b/tests/generic_map/test_rule_302.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_302_test_input.fixed.vhd"), lExpected) -class test_generic_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic_map/test_rule_600.py b/tests/generic_map/test_rule_600.py index 4c179a0d5..9c840b105 100644 --- a/tests/generic_map/test_rule_600.py +++ b/tests/generic_map/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_generic_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/generic_map/test_rule_601.py b/tests/generic_map/test_rule_601.py index 2c329cfb3..79f8cde6a 100644 --- a/tests/generic_map/test_rule_601.py +++ b/tests/generic_map/test_rule_601.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_601_test_input.vhd")) -class test_generic_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_generate_statement/test_rule_300.py b/tests/if_generate_statement/test_rule_300.py index 0d8efe3d5..79944e874 100644 --- a/tests/if_generate_statement/test_rule_300.py +++ b/tests/if_generate_statement/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_if_generate_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_generate_statement/test_rule_301.py b/tests/if_generate_statement/test_rule_301.py index 8fd1e1c06..9c47a49f8 100644 --- a/tests/if_generate_statement/test_rule_301.py +++ b/tests/if_generate_statement/test_rule_301.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_301_test_input.fixed.vhd"), lExpected) -class test_if_generate_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_generate_statement/test_rule_500.py b/tests/if_generate_statement/test_rule_500.py index 850a6d602..261e04e08 100644 --- a/tests/if_generate_statement/test_rule_500.py +++ b/tests/if_generate_statement/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_if_generate_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_generate_statement/test_rule_501.py b/tests/if_generate_statement/test_rule_501.py index e1e81c161..fed801488 100644 --- a/tests/if_generate_statement/test_rule_501.py +++ b/tests/if_generate_statement/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_if_generate_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_generate_statement/test_rule_502.py b/tests/if_generate_statement/test_rule_502.py index bff4f92f5..4f0896673 100644 --- a/tests/if_generate_statement/test_rule_502.py +++ b/tests/if_generate_statement/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_if_generate_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_generate_statement/test_rule_503.py b/tests/if_generate_statement/test_rule_503.py index 7a239aa46..bad3b5a75 100644 --- a/tests/if_generate_statement/test_rule_503.py +++ b/tests/if_generate_statement/test_rule_503.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_503_test_input.fixed_upper.vhd"), lExpected_upper) -class test_if_generate_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_001.py b/tests/if_statement/test_rule_001.py index eef01934c..8d8b519d6 100644 --- a/tests/if_statement/test_rule_001.py +++ b/tests/if_statement/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_002.py b/tests/if_statement/test_rule_002.py index 345a24b2d..f7697d605 100644 --- a/tests/if_statement/test_rule_002.py +++ b/tests/if_statement/test_rule_002.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed_parenthesis_remove.vhd"), lExpected_parenthesis_remove) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_003.py b/tests/if_statement/test_rule_003.py index 0f7a9c741..f3b1a092e 100644 --- a/tests/if_statement/test_rule_003.py +++ b/tests/if_statement/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_004.py b/tests/if_statement/test_rule_004.py index a3207911b..ee02e1db7 100644 --- a/tests/if_statement/test_rule_004.py +++ b/tests/if_statement/test_rule_004.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_005.py b/tests/if_statement/test_rule_005.py index 4734f853e..2c962e3ff 100644 --- a/tests/if_statement/test_rule_005.py +++ b/tests/if_statement/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_006.py b/tests/if_statement/test_rule_006.py index 60543f914..dc3cb48eb 100644 --- a/tests/if_statement/test_rule_006.py +++ b/tests/if_statement/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_007.py b/tests/if_statement/test_rule_007.py index b902a56b1..e3c86e283 100644 --- a/tests/if_statement/test_rule_007.py +++ b/tests/if_statement/test_rule_007.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_008.py b/tests/if_statement/test_rule_008.py index 6a7dc434b..3c9e4d64c 100644 --- a/tests/if_statement/test_rule_008.py +++ b/tests/if_statement/test_rule_008.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_009.py b/tests/if_statement/test_rule_009.py index f9b10c142..26d55e28a 100644 --- a/tests/if_statement/test_rule_009.py +++ b/tests/if_statement/test_rule_009.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_010.py b/tests/if_statement/test_rule_010.py index 6986517d7..2ba062ffe 100644 --- a/tests/if_statement/test_rule_010.py +++ b/tests/if_statement/test_rule_010.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_011.py b/tests/if_statement/test_rule_011.py index 89bf4011c..ecf6abae8 100644 --- a/tests/if_statement/test_rule_011.py +++ b/tests/if_statement/test_rule_011.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_011_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_012.py b/tests/if_statement/test_rule_012.py index eb4a569e3..3a7b45033 100644 --- a/tests/if_statement/test_rule_012.py +++ b/tests/if_statement/test_rule_012.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_012_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_013.py b/tests/if_statement/test_rule_013.py index 8be926901..4c8711aaa 100644 --- a/tests/if_statement/test_rule_013.py +++ b/tests/if_statement/test_rule_013.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_013_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_014.py b/tests/if_statement/test_rule_014.py index eaee4a4b6..d11fac642 100644 --- a/tests/if_statement/test_rule_014.py +++ b/tests/if_statement/test_rule_014.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_014_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_015.py b/tests/if_statement/test_rule_015.py index cece1604d..e1b2e8631 100644 --- a/tests/if_statement/test_rule_015.py +++ b/tests/if_statement/test_rule_015.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_015_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_020.py b/tests/if_statement/test_rule_020.py index 5c16a1333..9c59af09b 100644 --- a/tests/if_statement/test_rule_020.py +++ b/tests/if_statement/test_rule_020.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_020_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_021.py b/tests/if_statement/test_rule_021.py index ba88f887a..d1b537cf8 100644 --- a/tests/if_statement/test_rule_021.py +++ b/tests/if_statement/test_rule_021.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_021_test_input.fixed.vhd"), lExpected, False) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_022.py b/tests/if_statement/test_rule_022.py index c940f0a7f..f50ac59df 100644 --- a/tests/if_statement/test_rule_022.py +++ b/tests/if_statement/test_rule_022.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_022_test_input.fixed.vhd"), lExpected, False) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_023.py b/tests/if_statement/test_rule_023.py index 77c6038be..11aedae40 100644 --- a/tests/if_statement/test_rule_023.py +++ b/tests/if_statement/test_rule_023.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_023_test_input.fixed.vhd"), lExpected, False) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_024.py b/tests/if_statement/test_rule_024.py index cf371b546..13f204280 100644 --- a/tests/if_statement/test_rule_024.py +++ b/tests/if_statement/test_rule_024.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_024_test_input.fixed.vhd"), lExpected, False) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_025.py b/tests/if_statement/test_rule_025.py index 844d9efa1..23cfe02ad 100644 --- a/tests/if_statement/test_rule_025.py +++ b/tests/if_statement/test_rule_025.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_025_test_input.fixed_upper.vhd"), lExpected_upper) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_026.py b/tests/if_statement/test_rule_026.py index 10bebf1f5..e76e82b10 100644 --- a/tests/if_statement/test_rule_026.py +++ b/tests/if_statement/test_rule_026.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_026_test_input.fixed_upper.vhd"), lExpected_upper) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_027.py b/tests/if_statement/test_rule_027.py index 074edb9c4..e9d293077 100644 --- a/tests/if_statement/test_rule_027.py +++ b/tests/if_statement/test_rule_027.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_027_test_input.fixed_upper.vhd"), lExpected_upper) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_028.py b/tests/if_statement/test_rule_028.py index 1e98fca61..33b196195 100644 --- a/tests/if_statement/test_rule_028.py +++ b/tests/if_statement/test_rule_028.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_028_test_input.fixed_upper.vhd"), lExpected_upper) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_029.py b/tests/if_statement/test_rule_029.py index 3ac4114b9..9e3e0ad19 100644 --- a/tests/if_statement/test_rule_029.py +++ b/tests/if_statement/test_rule_029.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_029_test_input.fixed_upper.vhd"), lExpected_upper) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_030.py b/tests/if_statement/test_rule_030.py index 242988e9a..aa509179a 100644 --- a/tests/if_statement/test_rule_030.py +++ b/tests/if_statement/test_rule_030.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_030_test_input.fixed_no_blank.vhd"), lExpected_no_blank) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_031.py b/tests/if_statement/test_rule_031.py index e39be3f46..78eec4a9c 100644 --- a/tests/if_statement/test_rule_031.py +++ b/tests/if_statement/test_rule_031.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_031_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_034.py b/tests/if_statement/test_rule_034.py index 7dc275a6f..3b483f1f2 100644 --- a/tests/if_statement/test_rule_034.py +++ b/tests/if_statement/test_rule_034.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_034_test_input.fixed_upper.vhd"), lExpected_upper) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_035.py b/tests/if_statement/test_rule_035.py index 8f187a9b6..5d1a1cf02 100644 --- a/tests/if_statement/test_rule_035.py +++ b/tests/if_statement/test_rule_035.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_035_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/if_statement/test_rule_036.py b/tests/if_statement/test_rule_036.py index ecbdf922d..d1132320c 100644 --- a/tests/if_statement/test_rule_036.py +++ b/tests/if_statement/test_rule_036.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_036_test_input.fixed.vhd"), lExpected) -class test_if_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_002.py b/tests/instantiation/test_rule_002.py index 547c5040d..f478aaae9 100644 --- a/tests/instantiation/test_rule_002.py +++ b/tests/instantiation/test_rule_002.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_003.py b/tests/instantiation/test_rule_003.py index aacde9e9c..5bbd0ace2 100644 --- a/tests/instantiation/test_rule_003.py +++ b/tests/instantiation/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_004.py b/tests/instantiation/test_rule_004.py index 0f67372ff..95dee620d 100644 --- a/tests/instantiation/test_rule_004.py +++ b/tests/instantiation/test_rule_004.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_008.py b/tests/instantiation/test_rule_008.py index ceff33934..476f0cff2 100644 --- a/tests/instantiation/test_rule_008.py +++ b/tests/instantiation/test_rule_008.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed_upper.vhd"), lExpected_upper) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_009.py b/tests/instantiation/test_rule_009.py index 0b6cdabfc..ba0121c34 100644 --- a/tests/instantiation/test_rule_009.py +++ b/tests/instantiation/test_rule_009.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed_upper.vhd"), lExpected_upper) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_010.py b/tests/instantiation/test_rule_010.py index a48a9ff77..d3135f291 100644 --- a/tests/instantiation/test_rule_010.py +++ b/tests/instantiation/test_rule_010.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed.vhd"), lExpected) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_012.py b/tests/instantiation/test_rule_012.py index 43f9e55c4..a6353e4cf 100644 --- a/tests/instantiation/test_rule_012.py +++ b/tests/instantiation/test_rule_012.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_012_test_input.fixed.vhd"), lExpected) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_019.py b/tests/instantiation/test_rule_019.py index 7fb10a7e4..1bf53e182 100644 --- a/tests/instantiation/test_rule_019.py +++ b/tests/instantiation/test_rule_019.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_019_test_input.fixed.vhd"), lExpected) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_027.py b/tests/instantiation/test_rule_027.py index 590b31a04..f72fba838 100644 --- a/tests/instantiation/test_rule_027.py +++ b/tests/instantiation/test_rule_027.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_027_test_input.fixed_upper.vhd"), lExpected_upper) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_028.py b/tests/instantiation/test_rule_028.py index 654e49824..854bc29d1 100644 --- a/tests/instantiation/test_rule_028.py +++ b/tests/instantiation/test_rule_028.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_028_test_input.fixed_upper.vhd"), lExpected_upper) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_029.py b/tests/instantiation/test_rule_029.py index a12bf1a75..d2c493025 100644 --- a/tests/instantiation/test_rule_029.py +++ b/tests/instantiation/test_rule_029.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_029_test_input.fixed.vhd"), lExpected) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_031.py b/tests/instantiation/test_rule_031.py index 8683da6d1..d55519dc7 100644 --- a/tests/instantiation/test_rule_031.py +++ b/tests/instantiation/test_rule_031.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_031_test_input.fixed_upper.vhd"), lExpected_upper) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_032.py b/tests/instantiation/test_rule_032.py index 720dcb6fe..3e7858dd1 100644 --- a/tests/instantiation/test_rule_032.py +++ b/tests/instantiation/test_rule_032.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_032_test_input.fixed.vhd"), lExpected) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_033.py b/tests/instantiation/test_rule_033.py index 670a8abef..a7a33a2aa 100644 --- a/tests/instantiation/test_rule_033.py +++ b/tests/instantiation/test_rule_033.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_033_test_input.fixed_remove.vhd"), lExpected_remove) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_034.py b/tests/instantiation/test_rule_034.py index baf853485..8cd76ef19 100644 --- a/tests/instantiation/test_rule_034.py +++ b/tests/instantiation/test_rule_034.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_034_test_input.vhd")) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_035.py b/tests/instantiation/test_rule_035.py index c578c0ff9..fe4b014a1 100644 --- a/tests/instantiation/test_rule_035.py +++ b/tests/instantiation/test_rule_035.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_035_test_input.fixed.vhd"), lExpected) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_300.py b/tests/instantiation/test_rule_300.py index be3d6af17..cfda5db9e 100644 --- a/tests/instantiation/test_rule_300.py +++ b/tests/instantiation/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_500.py b/tests/instantiation/test_rule_500.py index 8781949c9..41a770257 100644 --- a/tests/instantiation/test_rule_500.py +++ b/tests/instantiation/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_600.py b/tests/instantiation/test_rule_600.py index 503c01d76..9a5db730d 100644 --- a/tests/instantiation/test_rule_600.py +++ b/tests/instantiation/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/instantiation/test_rule_601.py b/tests/instantiation/test_rule_601.py index d7dbb9989..489c6508f 100644 --- a/tests/instantiation/test_rule_601.py +++ b/tests/instantiation/test_rule_601.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_601_test_input.vhd")) -class test_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/iteration_scheme/test_rule_100.py b/tests/iteration_scheme/test_rule_100.py index 5b3f98cc6..6e13c13fe 100644 --- a/tests/iteration_scheme/test_rule_100.py +++ b/tests/iteration_scheme/test_rule_100.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_iteration_scheme_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/iteration_scheme/test_rule_101.py b/tests/iteration_scheme/test_rule_101.py index fe7e99e41..ca3fc18af 100644 --- a/tests/iteration_scheme/test_rule_101.py +++ b/tests/iteration_scheme/test_rule_101.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_iteration_scheme_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/iteration_scheme/test_rule_300.py b/tests/iteration_scheme/test_rule_300.py index 5a688cb65..ec007e3fa 100644 --- a/tests/iteration_scheme/test_rule_300.py +++ b/tests/iteration_scheme/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_iteration_scheme_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/iteration_scheme/test_rule_301.py b/tests/iteration_scheme/test_rule_301.py index 065fca3d7..e1b5b78bc 100644 --- a/tests/iteration_scheme/test_rule_301.py +++ b/tests/iteration_scheme/test_rule_301.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_301_test_input.fixed.vhd"), lExpected) -class test_iteration_scheme_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/iteration_scheme/test_rule_500.py b/tests/iteration_scheme/test_rule_500.py index 03bffe3d7..2b38f7c6a 100644 --- a/tests/iteration_scheme/test_rule_500.py +++ b/tests/iteration_scheme/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_iteration_scheme_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/iteration_scheme/test_rule_501.py b/tests/iteration_scheme/test_rule_501.py index a444625a0..2a06e7a7a 100644 --- a/tests/iteration_scheme/test_rule_501.py +++ b/tests/iteration_scheme/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_iteration_scheme_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/length/test_rule_001.py b/tests/length/test_rule_001.py index fc523e4c0..675ec4d2d 100644 --- a/tests/length/test_rule_001.py +++ b/tests/length/test_rule_001.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_001_test_input.vhd")) -class test_length_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/length/test_rule_002.py b/tests/length/test_rule_002.py index 16b731ffc..36ae97b4c 100644 --- a/tests/length/test_rule_002.py +++ b/tests/length/test_rule_002.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_002_test_input.vhd")) -class test_length_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/length/test_rule_003.py b/tests/length/test_rule_003.py index adb50a8eb..ae450f1e5 100644 --- a/tests/length/test_rule_003.py +++ b/tests/length/test_rule_003.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_003_test_input.vhd")) -class test_length_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/library/test_rule_001.py b/tests/library/test_rule_001.py index 2fc2cf5de..1c517c5db 100644 --- a/tests/library/test_rule_001.py +++ b/tests/library/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_library_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/library/test_rule_002.py b/tests/library/test_rule_002.py index 3c1810303..884ba2b28 100644 --- a/tests/library/test_rule_002.py +++ b/tests/library/test_rule_002.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_library_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/library/test_rule_003.py b/tests/library/test_rule_003.py index e3a212fcf..b2cecdc05 100644 --- a/tests/library/test_rule_003.py +++ b/tests/library/test_rule_003.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed_allow_library_clause.vhd"), lExpected_allow_library_clause) -class test_library_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/library/test_rule_004.py b/tests/library/test_rule_004.py index cda2290ba..8630ced2e 100644 --- a/tests/library/test_rule_004.py +++ b/tests/library/test_rule_004.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed_upper.vhd"), lExpected_upper) -class test_library_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/library/test_rule_005.py b/tests/library/test_rule_005.py index ec253186b..baae4f5e2 100644 --- a/tests/library/test_rule_005.py +++ b/tests/library/test_rule_005.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed_upper.vhd"), lExpected_upper) -class test_library_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/library/test_rule_006.py b/tests/library/test_rule_006.py index 2a37ba6d9..eb2eef360 100644 --- a/tests/library/test_rule_006.py +++ b/tests/library/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_library_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/library/test_rule_007.py b/tests/library/test_rule_007.py index 5cd66f290..3d9ae861f 100644 --- a/tests/library/test_rule_007.py +++ b/tests/library/test_rule_007.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_007_test_input.vhd")) -class test_library_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/library/test_rule_008.py b/tests/library/test_rule_008.py index f92d2c0ad..054d7ad97 100644 --- a/tests/library/test_rule_008.py +++ b/tests/library/test_rule_008.py @@ -14,7 +14,7 @@ dIndentMap = utils.read_indent_file() -class test_library_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/library/test_rule_009.py b/tests/library/test_rule_009.py index 47c0669f6..8e99ce7ed 100644 --- a/tests/library/test_rule_009.py +++ b/tests/library/test_rule_009.py @@ -22,7 +22,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed_smart_tabs.vhd"), lExpected_smart_tabs) -class test_library_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/library/test_rule_010.py b/tests/library/test_rule_010.py index a6c45e32c..a684e6bd7 100644 --- a/tests/library/test_rule_010.py +++ b/tests/library/test_rule_010.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed.vhd"), lExpected, False) -class test_library_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/library/test_rule_011.py b/tests/library/test_rule_011.py index 0554ed275..4bff68815 100644 --- a/tests/library/test_rule_011.py +++ b/tests/library/test_rule_011.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_011_test_input.fixed.vhd"), lExpected, False) -class test_library_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/library/test_rule_500.py b/tests/library/test_rule_500.py index 1997c86d4..06d6114ba 100644 --- a/tests/library/test_rule_500.py +++ b/tests/library/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_library_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/logical_operator/test_rule_500.py b/tests/logical_operator/test_rule_500.py index bc86c309d..1ba59d3a8 100644 --- a/tests/logical_operator/test_rule_500.py +++ b/tests/logical_operator/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_logical_operator_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_001.py b/tests/loop_statement/test_rule_001.py index ce2124ed9..e22738648 100644 --- a/tests/loop_statement/test_rule_001.py +++ b/tests/loop_statement/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_002.py b/tests/loop_statement/test_rule_002.py index 3255023a1..ee8cfb6fb 100644 --- a/tests/loop_statement/test_rule_002.py +++ b/tests/loop_statement/test_rule_002.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_003.py b/tests/loop_statement/test_rule_003.py index 3863ee6a9..6c4520ae8 100644 --- a/tests/loop_statement/test_rule_003.py +++ b/tests/loop_statement/test_rule_003.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_004.py b/tests/loop_statement/test_rule_004.py index 6f5252a22..b971f438e 100644 --- a/tests/loop_statement/test_rule_004.py +++ b/tests/loop_statement/test_rule_004.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_005.py b/tests/loop_statement/test_rule_005.py index e7465e472..a9d7229a3 100644 --- a/tests/loop_statement/test_rule_005.py +++ b/tests/loop_statement/test_rule_005.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_006.py b/tests/loop_statement/test_rule_006.py index a9b380730..712f07199 100644 --- a/tests/loop_statement/test_rule_006.py +++ b/tests/loop_statement/test_rule_006.py @@ -14,7 +14,7 @@ dIndentMap = utils.read_indent_file() -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_007.py b/tests/loop_statement/test_rule_007.py index a509b4c80..a2b0b2117 100644 --- a/tests/loop_statement/test_rule_007.py +++ b/tests/loop_statement/test_rule_007.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_100.py b/tests/loop_statement/test_rule_100.py index 952e574cf..de77f5ed5 100644 --- a/tests/loop_statement/test_rule_100.py +++ b/tests/loop_statement/test_rule_100.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_101.py b/tests/loop_statement/test_rule_101.py index df7c91a6a..843265d59 100644 --- a/tests/loop_statement/test_rule_101.py +++ b/tests/loop_statement/test_rule_101.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_102.py b/tests/loop_statement/test_rule_102.py index fb131cff1..8168095f3 100644 --- a/tests/loop_statement/test_rule_102.py +++ b/tests/loop_statement/test_rule_102.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_102_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_103.py b/tests/loop_statement/test_rule_103.py index 49a7e4152..e1d6cb6b6 100644 --- a/tests/loop_statement/test_rule_103.py +++ b/tests/loop_statement/test_rule_103.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_103_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_104.py b/tests/loop_statement/test_rule_104.py index a23058a57..ddcc3b08c 100644 --- a/tests/loop_statement/test_rule_104.py +++ b/tests/loop_statement/test_rule_104.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_104_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_200.py b/tests/loop_statement/test_rule_200.py index e534572c9..fc2a38ec1 100644 --- a/tests/loop_statement/test_rule_200.py +++ b/tests/loop_statement/test_rule_200.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_200_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_201.py b/tests/loop_statement/test_rule_201.py index 79893802c..df3d84c8a 100644 --- a/tests/loop_statement/test_rule_201.py +++ b/tests/loop_statement/test_rule_201.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_201_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_202.py b/tests/loop_statement/test_rule_202.py index 579040a30..85468656d 100644 --- a/tests/loop_statement/test_rule_202.py +++ b/tests/loop_statement/test_rule_202.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_202_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_203.py b/tests/loop_statement/test_rule_203.py index 5724f429a..b72000ea3 100644 --- a/tests/loop_statement/test_rule_203.py +++ b/tests/loop_statement/test_rule_203.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_203_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_300.py b/tests/loop_statement/test_rule_300.py index 8966336f1..606539edb 100644 --- a/tests/loop_statement/test_rule_300.py +++ b/tests/loop_statement/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_301.py b/tests/loop_statement/test_rule_301.py index 317ecd840..5b24ce1d4 100644 --- a/tests/loop_statement/test_rule_301.py +++ b/tests/loop_statement/test_rule_301.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_301_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_302.py b/tests/loop_statement/test_rule_302.py index d551835b3..05ff9caff 100644 --- a/tests/loop_statement/test_rule_302.py +++ b/tests/loop_statement/test_rule_302.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_302_test_input.fixed.vhd"), lExpected) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_500.py b/tests/loop_statement/test_rule_500.py index ca5ee69c8..1c164add2 100644 --- a/tests/loop_statement/test_rule_500.py +++ b/tests/loop_statement/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_501.py b/tests/loop_statement/test_rule_501.py index 6e3fa1621..d8fb7813d 100644 --- a/tests/loop_statement/test_rule_501.py +++ b/tests/loop_statement/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_502.py b/tests/loop_statement/test_rule_502.py index 9d19b5892..c7fee8fd0 100644 --- a/tests/loop_statement/test_rule_502.py +++ b/tests/loop_statement/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_503.py b/tests/loop_statement/test_rule_503.py index 651dc0bc6..66b8108a1 100644 --- a/tests/loop_statement/test_rule_503.py +++ b/tests/loop_statement/test_rule_503.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_503_test_input.fixed_upper.vhd"), lExpected_upper) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_504.py b/tests/loop_statement/test_rule_504.py index 9f1487b81..1d78146a4 100644 --- a/tests/loop_statement/test_rule_504.py +++ b/tests/loop_statement/test_rule_504.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_504_test_input.fixed_upper.vhd"), lExpected_upper) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_600.py b/tests/loop_statement/test_rule_600.py index 367e98fdb..ffab7bd8c 100644 --- a/tests/loop_statement/test_rule_600.py +++ b/tests/loop_statement/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/loop_statement/test_rule_601.py b/tests/loop_statement/test_rule_601.py index 89bc05c65..f0d859c4f 100644 --- a/tests/loop_statement/test_rule_601.py +++ b/tests/loop_statement/test_rule_601.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_601_test_input.vhd")) -class test_loop_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/next_statement/test_rule_300.py b/tests/next_statement/test_rule_300.py index 8901c3956..cfe3f0bb2 100644 --- a/tests/next_statement/test_rule_300.py +++ b/tests/next_statement/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_next_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/next_statement/test_rule_301.py b/tests/next_statement/test_rule_301.py index 914278649..22016d8a7 100644 --- a/tests/next_statement/test_rule_301.py +++ b/tests/next_statement/test_rule_301.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_301_test_input.fixed.vhd"), lExpected) -class test_return_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/next_statement/test_rule_500.py b/tests/next_statement/test_rule_500.py index 2024de16d..a5f9d8c0e 100644 --- a/tests/next_statement/test_rule_500.py +++ b/tests/next_statement/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_next_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/next_statement/test_rule_501.py b/tests/next_statement/test_rule_501.py index 8b055e3e9..5e817d492 100644 --- a/tests/next_statement/test_rule_501.py +++ b/tests/next_statement/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_next_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/null_statement/test_rule_300.py b/tests/null_statement/test_rule_300.py index 661e601cb..dc39bf7b2 100644 --- a/tests/null_statement/test_rule_300.py +++ b/tests/null_statement/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_null_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/null_statement/test_rule_301.py b/tests/null_statement/test_rule_301.py index 661e601cb..dc39bf7b2 100644 --- a/tests/null_statement/test_rule_301.py +++ b/tests/null_statement/test_rule_301.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_null_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/null_statement/test_rule_500.py b/tests/null_statement/test_rule_500.py index 1db2680a7..b4ac4fffc 100644 --- a/tests/null_statement/test_rule_500.py +++ b/tests/null_statement/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_null_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_001.py b/tests/package/test_rule_001.py index 232c2bbfb..57e82fd01 100644 --- a/tests/package/test_rule_001.py +++ b/tests/package/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_002.py b/tests/package/test_rule_002.py index ccf526b06..048dbb0f3 100644 --- a/tests/package/test_rule_002.py +++ b/tests/package/test_rule_002.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_003.py b/tests/package/test_rule_003.py index 5adf94be4..aed97d27e 100644 --- a/tests/package/test_rule_003.py +++ b/tests/package/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_004.py b/tests/package/test_rule_004.py index 11b5e685c..1326da422 100644 --- a/tests/package/test_rule_004.py +++ b/tests/package/test_rule_004.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_005.py b/tests/package/test_rule_005.py index 6a3d1f140..e07884b07 100644 --- a/tests/package/test_rule_005.py +++ b/tests/package/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_006.py b/tests/package/test_rule_006.py index 990685720..9d7ec2615 100644 --- a/tests/package/test_rule_006.py +++ b/tests/package/test_rule_006.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_007.py b/tests/package/test_rule_007.py index 41b819fdc..26f2b55bc 100644 --- a/tests/package/test_rule_007.py +++ b/tests/package/test_rule_007.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed_remove.vhd"), lExpected_remove) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_008.py b/tests/package/test_rule_008.py index 40d09fc79..95f5a4875 100644 --- a/tests/package/test_rule_008.py +++ b/tests/package/test_rule_008.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_009.py b/tests/package/test_rule_009.py index c7b9a8e1d..3a332a58d 100644 --- a/tests/package/test_rule_009.py +++ b/tests/package/test_rule_009.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed.vhd"), lExpected) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_010.py b/tests/package/test_rule_010.py index 81ef50e1b..0cc0b458b 100644 --- a/tests/package/test_rule_010.py +++ b/tests/package/test_rule_010.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_011.py b/tests/package/test_rule_011.py index 6f73de964..cbf96b3a5 100644 --- a/tests/package/test_rule_011.py +++ b/tests/package/test_rule_011.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_011_test_input.fixed.vhd"), lExpected) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_012.py b/tests/package/test_rule_012.py index 18cca032e..3a1c83d89 100644 --- a/tests/package/test_rule_012.py +++ b/tests/package/test_rule_012.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_012_test_input.fixed.vhd"), lExpected) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_013.py b/tests/package/test_rule_013.py index 1b4b4631a..63b3de0df 100644 --- a/tests/package/test_rule_013.py +++ b/tests/package/test_rule_013.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_013_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_014.py b/tests/package/test_rule_014.py index c09bb44a0..b1a7572c6 100644 --- a/tests/package/test_rule_014.py +++ b/tests/package/test_rule_014.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_014_test_input.fixed_remove.vhd"), lExpected_remove) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_015.py b/tests/package/test_rule_015.py index 5c99ba2e2..6cd6a1cac 100644 --- a/tests/package/test_rule_015.py +++ b/tests/package/test_rule_015.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_015_test_input.fixed.vhd"), lExpected) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_016.py b/tests/package/test_rule_016.py index 8cc0fd45c..1d5bb0c1b 100644 --- a/tests/package/test_rule_016.py +++ b/tests/package/test_rule_016.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_016_test_input.vhd")) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_017.py b/tests/package/test_rule_017.py index 7d5d8a3fc..2b2444b15 100644 --- a/tests/package/test_rule_017.py +++ b/tests/package/test_rule_017.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_017_test_input.vhd")) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_018.py b/tests/package/test_rule_018.py index 89be1477c..3eb2e795b 100644 --- a/tests/package/test_rule_018.py +++ b/tests/package/test_rule_018.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_018_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_019.py b/tests/package/test_rule_019.py index 10b6bd97e..1eb1f4998 100644 --- a/tests/package/test_rule_019.py +++ b/tests/package/test_rule_019.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_019_test_input.fixed.vhd"), lExpected) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_400.py b/tests/package/test_rule_400.py index 48d286351..4f7b425a4 100644 --- a/tests/package/test_rule_400.py +++ b/tests/package/test_rule_400.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_400_test_input.fixed.vhd"), lExpected) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_401.py b/tests/package/test_rule_401.py index 7789e1a28..559dc9de5 100644 --- a/tests/package/test_rule_401.py +++ b/tests/package/test_rule_401.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_401_test_input.fixed.vhd"), lExpected, bStrip=False) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package/test_rule_402.py b/tests/package/test_rule_402.py index 630dd908e..3e43d17d5 100644 --- a/tests/package/test_rule_402.py +++ b/tests/package/test_rule_402.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_402_test_input.fixed.vhd"), lExpected, bStrip=False) -class test_package_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_001.py b/tests/package_body/test_rule_001.py index 08667665c..2ad539ae0 100644 --- a/tests/package_body/test_rule_001.py +++ b/tests/package_body/test_rule_001.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_002.py b/tests/package_body/test_rule_002.py index 04730dd76..d7d0e5d5d 100644 --- a/tests/package_body/test_rule_002.py +++ b/tests/package_body/test_rule_002.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed_remove.vhd"), lExpected_remove) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_003.py b/tests/package_body/test_rule_003.py index dbe4a0147..f4d487955 100644 --- a/tests/package_body/test_rule_003.py +++ b/tests/package_body/test_rule_003.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed_remove.vhd"), lExpected_remove) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_100.py b/tests/package_body/test_rule_100.py index fade747a8..c650081b1 100644 --- a/tests/package_body/test_rule_100.py +++ b/tests/package_body/test_rule_100.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_101.py b/tests/package_body/test_rule_101.py index 08508bab5..4cba45d03 100644 --- a/tests/package_body/test_rule_101.py +++ b/tests/package_body/test_rule_101.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_200.py b/tests/package_body/test_rule_200.py index 7d01b0250..9a76c2137 100644 --- a/tests/package_body/test_rule_200.py +++ b/tests/package_body/test_rule_200.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_200_test_input.fixed.vhd"), lExpected) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_201.py b/tests/package_body/test_rule_201.py index fae0c64ba..382907a25 100644 --- a/tests/package_body/test_rule_201.py +++ b/tests/package_body/test_rule_201.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_201_test_input.fixed.vhd"), lExpected) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_202.py b/tests/package_body/test_rule_202.py index e51bb2856..dbaadce46 100644 --- a/tests/package_body/test_rule_202.py +++ b/tests/package_body/test_rule_202.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_202_test_input.fixed.vhd"), lExpected) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_203.py b/tests/package_body/test_rule_203.py index 3f8835706..ab430d860 100644 --- a/tests/package_body/test_rule_203.py +++ b/tests/package_body/test_rule_203.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_203_test_input.fixed.vhd"), lExpected) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_300.py b/tests/package_body/test_rule_300.py index 34e6f0daf..a448c0a65 100644 --- a/tests/package_body/test_rule_300.py +++ b/tests/package_body/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_301.py b/tests/package_body/test_rule_301.py index 9df92840c..dfc35d46c 100644 --- a/tests/package_body/test_rule_301.py +++ b/tests/package_body/test_rule_301.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_301_test_input.fixed.vhd"), lExpected) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_400.py b/tests/package_body/test_rule_400.py index a8f396dcd..e8935e432 100644 --- a/tests/package_body/test_rule_400.py +++ b/tests/package_body/test_rule_400.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_400_test_input.fixed.vhd"), lExpected) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_401.py b/tests/package_body/test_rule_401.py index 2698845ba..1e6da595c 100644 --- a/tests/package_body/test_rule_401.py +++ b/tests/package_body/test_rule_401.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_401_test_input.fixed.vhd"), lExpected) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_402.py b/tests/package_body/test_rule_402.py index 135ef339d..95bbb67b8 100644 --- a/tests/package_body/test_rule_402.py +++ b/tests/package_body/test_rule_402.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_402_test_input.fixed.vhd"), lExpected) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_500.py b/tests/package_body/test_rule_500.py index 4efe50ef3..8fb95c6ad 100644 --- a/tests/package_body/test_rule_500.py +++ b/tests/package_body/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_501.py b/tests/package_body/test_rule_501.py index a06d6fdd9..2c8cac7a7 100644 --- a/tests/package_body/test_rule_501.py +++ b/tests/package_body/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_502.py b/tests/package_body/test_rule_502.py index e19569379..5510b064f 100644 --- a/tests/package_body/test_rule_502.py +++ b/tests/package_body/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_503.py b/tests/package_body/test_rule_503.py index 1322f7706..b15fd9cf4 100644 --- a/tests/package_body/test_rule_503.py +++ b/tests/package_body/test_rule_503.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_503_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_504.py b/tests/package_body/test_rule_504.py index 2a540bc72..fadb5cb30 100644 --- a/tests/package_body/test_rule_504.py +++ b/tests/package_body/test_rule_504.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_504_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_505.py b/tests/package_body/test_rule_505.py index 9b3b2dee0..0011f9775 100644 --- a/tests/package_body/test_rule_505.py +++ b/tests/package_body/test_rule_505.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_505_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_506.py b/tests/package_body/test_rule_506.py index 7058cc687..99e0670b9 100644 --- a/tests/package_body/test_rule_506.py +++ b/tests/package_body/test_rule_506.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_506_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_507.py b/tests/package_body/test_rule_507.py index 5e69d93e1..d3b8486bb 100644 --- a/tests/package_body/test_rule_507.py +++ b/tests/package_body/test_rule_507.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_507_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_600.py b/tests/package_body/test_rule_600.py index f967a331b..ca33fe381 100644 --- a/tests/package_body/test_rule_600.py +++ b/tests/package_body/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_body/test_rule_601.py b/tests/package_body/test_rule_601.py index b1ff0b66d..8a7fa7348 100644 --- a/tests/package_body/test_rule_601.py +++ b/tests/package_body/test_rule_601.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_601_test_input.vhd")) -class test_package_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_001.py b/tests/package_instantiation/test_rule_001.py index 189f54d7a..47f84a13c 100644 --- a/tests/package_instantiation/test_rule_001.py +++ b/tests/package_instantiation/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_002.py b/tests/package_instantiation/test_rule_002.py index 2b88f19af..e756b2400 100644 --- a/tests/package_instantiation/test_rule_002.py +++ b/tests/package_instantiation/test_rule_002.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_003.py b/tests/package_instantiation/test_rule_003.py index dac80fd34..50c1b6f41 100644 --- a/tests/package_instantiation/test_rule_003.py +++ b/tests/package_instantiation/test_rule_003.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_004.py b/tests/package_instantiation/test_rule_004.py index 21109469c..1c695e837 100644 --- a/tests/package_instantiation/test_rule_004.py +++ b/tests/package_instantiation/test_rule_004.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_100.py b/tests/package_instantiation/test_rule_100.py index 86ed65f58..1371928af 100644 --- a/tests/package_instantiation/test_rule_100.py +++ b/tests/package_instantiation/test_rule_100.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_101.py b/tests/package_instantiation/test_rule_101.py index e9cb7aeff..afae05c6d 100644 --- a/tests/package_instantiation/test_rule_101.py +++ b/tests/package_instantiation/test_rule_101.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_102.py b/tests/package_instantiation/test_rule_102.py index 2c69b625d..672931ce5 100644 --- a/tests/package_instantiation/test_rule_102.py +++ b/tests/package_instantiation/test_rule_102.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_102_test_input.fixed.vhd"), lExpected) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_103.py b/tests/package_instantiation/test_rule_103.py index ea1bac9c4..8cc83f0d6 100644 --- a/tests/package_instantiation/test_rule_103.py +++ b/tests/package_instantiation/test_rule_103.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_103_test_input.fixed.vhd"), lExpected) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_200.py b/tests/package_instantiation/test_rule_200.py index 1f887c31e..2da48902a 100644 --- a/tests/package_instantiation/test_rule_200.py +++ b/tests/package_instantiation/test_rule_200.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_200_test_input.fixed.vhd"), lExpected) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_201.py b/tests/package_instantiation/test_rule_201.py index 748bd1842..819ad3153 100644 --- a/tests/package_instantiation/test_rule_201.py +++ b/tests/package_instantiation/test_rule_201.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_201_test_input.fixed.vhd"), lExpected) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_300.py b/tests/package_instantiation/test_rule_300.py index a14e7de98..09c7a5a82 100644 --- a/tests/package_instantiation/test_rule_300.py +++ b/tests/package_instantiation/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_500.py b/tests/package_instantiation/test_rule_500.py index 480b82803..b51c734f3 100644 --- a/tests/package_instantiation/test_rule_500.py +++ b/tests/package_instantiation/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_501.py b/tests/package_instantiation/test_rule_501.py index 297deb9e9..de31d740b 100644 --- a/tests/package_instantiation/test_rule_501.py +++ b/tests/package_instantiation/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_502.py b/tests/package_instantiation/test_rule_502.py index 7eb706898..2e5d798e2 100644 --- a/tests/package_instantiation/test_rule_502.py +++ b/tests/package_instantiation/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_503.py b/tests/package_instantiation/test_rule_503.py index 1e707057a..25b1f624f 100644 --- a/tests/package_instantiation/test_rule_503.py +++ b/tests/package_instantiation/test_rule_503.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_503_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_504.py b/tests/package_instantiation/test_rule_504.py index 6e58e26b1..e0e026b80 100644 --- a/tests/package_instantiation/test_rule_504.py +++ b/tests/package_instantiation/test_rule_504.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_504_test_input.fixed_upper.vhd"), lExpected_upper) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_600.py b/tests/package_instantiation/test_rule_600.py index 36340416f..bcdea9a7e 100644 --- a/tests/package_instantiation/test_rule_600.py +++ b/tests/package_instantiation/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/package_instantiation/test_rule_601.py b/tests/package_instantiation/test_rule_601.py index f1ff34ce1..909146080 100644 --- a/tests/package_instantiation/test_rule_601.py +++ b/tests/package_instantiation/test_rule_601.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_601_test_input.vhd")) -class test_package_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/parameter_specification/test_rule_500.py b/tests/parameter_specification/test_rule_500.py index ae64649b0..ad1699cdb 100644 --- a/tests/parameter_specification/test_rule_500.py +++ b/tests/parameter_specification/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_iteration_scheme_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_001.py b/tests/port/test_rule_001.py index 030d59fb0..704ec2a30 100644 --- a/tests/port/test_rule_001.py +++ b/tests/port/test_rule_001.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_002.py b/tests/port/test_rule_002.py index 961047539..605449b93 100644 --- a/tests/port/test_rule_002.py +++ b/tests/port/test_rule_002.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_003.py b/tests/port/test_rule_003.py index dcaffcf2f..306e4cf47 100644 --- a/tests/port/test_rule_003.py +++ b/tests/port/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_004.py b/tests/port/test_rule_004.py index 2d9d6e48e..ea5cd1af5 100644 --- a/tests/port/test_rule_004.py +++ b/tests/port/test_rule_004.py @@ -22,7 +22,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed_smart_tabs.vhd"), lExpected_smart_tabs) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_007.py b/tests/port/test_rule_007.py index 1d9e87afb..29296838b 100644 --- a/tests/port/test_rule_007.py +++ b/tests/port/test_rule_007.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed_before_0_after_1.vhd"), lExpected_before_0_after_1) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_008.py b/tests/port/test_rule_008.py index 790171ce7..21a1a76c4 100644 --- a/tests/port/test_rule_008.py +++ b/tests/port/test_rule_008.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed.vhd"), lExpected) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_009.py b/tests/port/test_rule_009.py index d775e318b..69cff376a 100644 --- a/tests/port/test_rule_009.py +++ b/tests/port/test_rule_009.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed.vhd"), lExpected) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_010.py b/tests/port/test_rule_010.py index 437ae9fca..b68a5de66 100644 --- a/tests/port/test_rule_010.py +++ b/tests/port/test_rule_010.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed_upper.vhd"), lExpected_upper) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_011.py b/tests/port/test_rule_011.py index 34bfc3a99..d70e6c64a 100644 --- a/tests/port/test_rule_011.py +++ b/tests/port/test_rule_011.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_011_test_input.vhd")) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_012.py b/tests/port/test_rule_012.py index 97aeb3390..64ee7ea18 100644 --- a/tests/port/test_rule_012.py +++ b/tests/port/test_rule_012.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_012_test_input.fixed.vhd"), lExpected) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_013.py b/tests/port/test_rule_013.py index c132214e0..d0f83800e 100644 --- a/tests/port/test_rule_013.py +++ b/tests/port/test_rule_013.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_013_test_input.fixed.vhd"), lExpected) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_014.py b/tests/port/test_rule_014.py index 2ebe5b631..4a87a2003 100644 --- a/tests/port/test_rule_014.py +++ b/tests/port/test_rule_014.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_014_test_input.fixed_move_left.vhd"), lExpected_move_left) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_015.py b/tests/port/test_rule_015.py index 0f9366ed8..3d601b519 100644 --- a/tests/port/test_rule_015.py +++ b/tests/port/test_rule_015.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_015_test_input.fixed.vhd"), lExpected) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_016.py b/tests/port/test_rule_016.py index e3d4c4fd0..5d1836754 100644 --- a/tests/port/test_rule_016.py +++ b/tests/port/test_rule_016.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_016_test_input.fixed.vhd"), lExpected) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_017.py b/tests/port/test_rule_017.py index b630a6f9d..d3d8d0337 100644 --- a/tests/port/test_rule_017.py +++ b/tests/port/test_rule_017.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_017_test_input.fixed_upper.vhd"), lExpected_upper) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_019.py b/tests/port/test_rule_019.py index 640dec43f..1a949231f 100644 --- a/tests/port/test_rule_019.py +++ b/tests/port/test_rule_019.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_019_test_input.fixed_upper.vhd"), lExpected_upper) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_020.py b/tests/port/test_rule_020.py index fea8e64ec..8e2d071e1 100644 --- a/tests/port/test_rule_020.py +++ b/tests/port/test_rule_020.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_020_test_input.fixed.vhd"), lExpected) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_021.py b/tests/port/test_rule_021.py index b103ddfc6..7c6173076 100644 --- a/tests/port/test_rule_021.py +++ b/tests/port/test_rule_021.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_021_test_input.fixed.vhd"), lExpected, False) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_022.py b/tests/port/test_rule_022.py index a4bb31b8e..134ab686a 100644 --- a/tests/port/test_rule_022.py +++ b/tests/port/test_rule_022.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_022_test_input.fixed.vhd"), lExpected) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_023.py b/tests/port/test_rule_023.py index 61d75e1ba..5d41dbe59 100644 --- a/tests/port/test_rule_023.py +++ b/tests/port/test_rule_023.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_023_test_input.vhd")) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_024.py b/tests/port/test_rule_024.py index a66b9f7a5..8aff7bc7d 100644 --- a/tests/port/test_rule_024.py +++ b/tests/port/test_rule_024.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_024_test_input.fixed.vhd"), lExpected) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_025.py b/tests/port/test_rule_025.py index feecbe1b8..9712c46d8 100644 --- a/tests/port/test_rule_025.py +++ b/tests/port/test_rule_025.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_025_test_input.vhd")) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_026.py b/tests/port/test_rule_026.py index 2dbf297e7..0d3fa33ee 100644 --- a/tests/port/test_rule_026.py +++ b/tests/port/test_rule_026.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_026_test_input.fixed.vhd"), lExpected) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_027.py b/tests/port/test_rule_027.py index cef06e92c..bafb9a195 100644 --- a/tests/port/test_rule_027.py +++ b/tests/port/test_rule_027.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_027_test_input.fixed.vhd"), lExpected) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_600.py b/tests/port/test_rule_600.py index 57ed5e686..f0eaa8a10 100644 --- a/tests/port/test_rule_600.py +++ b/tests/port/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_601.py b/tests/port/test_rule_601.py index 8b34cc69b..a110a5deb 100644 --- a/tests/port/test_rule_601.py +++ b/tests/port/test_rule_601.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_601_test_input.vhd")) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_602.py b/tests/port/test_rule_602.py index d17e73abe..6e901ac49 100644 --- a/tests/port/test_rule_602.py +++ b/tests/port/test_rule_602.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_602_test_input.vhd")) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_603.py b/tests/port/test_rule_603.py index d0c3c4858..3c42762d8 100644 --- a/tests/port/test_rule_603.py +++ b/tests/port/test_rule_603.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_603_test_input.vhd")) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_604.py b/tests/port/test_rule_604.py index be179b0a4..1148be31c 100644 --- a/tests/port/test_rule_604.py +++ b/tests/port/test_rule_604.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_604_test_input.vhd")) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_605.py b/tests/port/test_rule_605.py index 010ef9151..c2a515860 100644 --- a/tests/port/test_rule_605.py +++ b/tests/port/test_rule_605.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_605_test_input.vhd")) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_606.py b/tests/port/test_rule_606.py index 604269a1a..a56adbccf 100644 --- a/tests/port/test_rule_606.py +++ b/tests/port/test_rule_606.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_606_test_input.vhd")) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_607.py b/tests/port/test_rule_607.py index f32de0121..2c3dc5791 100644 --- a/tests/port/test_rule_607.py +++ b/tests/port/test_rule_607.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_607_test_input.vhd")) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_608.py b/tests/port/test_rule_608.py index 583895550..fa7630dbe 100644 --- a/tests/port/test_rule_608.py +++ b/tests/port/test_rule_608.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_608_test_input.vhd")) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port/test_rule_609.py b/tests/port/test_rule_609.py index 8ceda32b3..3bc8ff2ae 100644 --- a/tests/port/test_rule_609.py +++ b/tests/port/test_rule_609.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_609_test_input.vhd")) -class test_port_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_001.py b/tests/port_map/test_rule_001.py index 361ecf383..8a0434f63 100644 --- a/tests/port_map/test_rule_001.py +++ b/tests/port_map/test_rule_001.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed_upper.vhd"), lExpected_upper) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_002.py b/tests/port_map/test_rule_002.py index 97d0aae4d..4263050df 100644 --- a/tests/port_map/test_rule_002.py +++ b/tests/port_map/test_rule_002.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed_upper.vhd"), lExpected_upper) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_003.py b/tests/port_map/test_rule_003.py index 1c7440853..74ca0949b 100644 --- a/tests/port_map/test_rule_003.py +++ b/tests/port_map/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected, False) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_004.py b/tests/port_map/test_rule_004.py index bdc3af003..65325efae 100644 --- a/tests/port_map/test_rule_004.py +++ b/tests/port_map/test_rule_004.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed_same_line.vhd"), lExpected_same_line, True) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_005.py b/tests/port_map/test_rule_005.py index 534babd37..aaf14d48f 100644 --- a/tests/port_map/test_rule_005.py +++ b/tests/port_map/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_006.py b/tests/port_map/test_rule_006.py index 87a707d5f..a415634bb 100644 --- a/tests/port_map/test_rule_006.py +++ b/tests/port_map/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_007.py b/tests/port_map/test_rule_007.py index 3cd8a26e0..d3d8de80e 100644 --- a/tests/port_map/test_rule_007.py +++ b/tests/port_map/test_rule_007.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_008.py b/tests/port_map/test_rule_008.py index 556c2050d..5ddd703eb 100644 --- a/tests/port_map/test_rule_008.py +++ b/tests/port_map/test_rule_008.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_008_test_input.vhd")) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_009.py b/tests/port_map/test_rule_009.py index 52cf8b968..fd9d2ebef 100644 --- a/tests/port_map/test_rule_009.py +++ b/tests/port_map/test_rule_009.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed.vhd"), lExpected, False) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_010.py b/tests/port_map/test_rule_010.py index 5954c421e..6dd396b48 100644 --- a/tests/port_map/test_rule_010.py +++ b/tests/port_map/test_rule_010.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed.vhd"), lExpected) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_011.py b/tests/port_map/test_rule_011.py index f1466fbd5..4805a7fe9 100644 --- a/tests/port_map/test_rule_011.py +++ b/tests/port_map/test_rule_011.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_011_test_input.fixed.vhd"), lExpected, False) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_101.py b/tests/port_map/test_rule_101.py index 1b0994490..f4bc7b694 100644 --- a/tests/port_map/test_rule_101.py +++ b/tests/port_map/test_rule_101.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_200.py b/tests/port_map/test_rule_200.py index a98d39a66..b8ee1de9b 100644 --- a/tests/port_map/test_rule_200.py +++ b/tests/port_map/test_rule_200.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_200_test_input.fixed.vhd"), lExpected) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_300.py b/tests/port_map/test_rule_300.py index 831daf79c..8fee52c5f 100644 --- a/tests/port_map/test_rule_300.py +++ b/tests/port_map/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_301.py b/tests/port_map/test_rule_301.py index 6f1415ba4..306434b98 100644 --- a/tests/port_map/test_rule_301.py +++ b/tests/port_map/test_rule_301.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_301_test_input.fixed.vhd"), lExpected) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/port_map/test_rule_302.py b/tests/port_map/test_rule_302.py index 3e18984e3..a13b47e7c 100644 --- a/tests/port_map/test_rule_302.py +++ b/tests/port_map/test_rule_302.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_302_test_input.fixed.vhd"), lExpected) -class test_port_map_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_001.py b/tests/procedure/test_rule_001.py index 6b4878a96..c01abe603 100644 --- a/tests/procedure/test_rule_001.py +++ b/tests/procedure/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_002.py b/tests/procedure/test_rule_002.py index 28f598636..f7fad6e5a 100644 --- a/tests/procedure/test_rule_002.py +++ b/tests/procedure/test_rule_002.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_003.py b/tests/procedure/test_rule_003.py index b674c4785..a29a43b76 100644 --- a/tests/procedure/test_rule_003.py +++ b/tests/procedure/test_rule_003.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_004.py b/tests/procedure/test_rule_004.py index 8c2e4591f..f5b9edd87 100644 --- a/tests/procedure/test_rule_004.py +++ b/tests/procedure/test_rule_004.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_005.py b/tests/procedure/test_rule_005.py index 1db1a183a..c294d03b0 100644 --- a/tests/procedure/test_rule_005.py +++ b/tests/procedure/test_rule_005.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_006.py b/tests/procedure/test_rule_006.py index c164fdaec..56d686825 100644 --- a/tests/procedure/test_rule_006.py +++ b/tests/procedure/test_rule_006.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_008.py b/tests/procedure/test_rule_008.py index 9f30a024a..f1c68f906 100644 --- a/tests/procedure/test_rule_008.py +++ b/tests/procedure/test_rule_008.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed_upper.vhd"), lExpected_upper) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_010.py b/tests/procedure/test_rule_010.py index fc3f0c69d..a743be77a 100644 --- a/tests/procedure/test_rule_010.py +++ b/tests/procedure/test_rule_010.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed.vhd"), lExpected) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_012.py b/tests/procedure/test_rule_012.py index 446af8483..f37abe854 100644 --- a/tests/procedure/test_rule_012.py +++ b/tests/procedure/test_rule_012.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_012_test_input.vhd")) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_014.py b/tests/procedure/test_rule_014.py index e567b5ee6..1be78f604 100644 --- a/tests/procedure/test_rule_014.py +++ b/tests/procedure/test_rule_014.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_014_test_input.vhd")) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_100.py b/tests/procedure/test_rule_100.py index c7e01ce81..9b8e175df 100644 --- a/tests/procedure/test_rule_100.py +++ b/tests/procedure/test_rule_100.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_101.py b/tests/procedure/test_rule_101.py index f4ffb0839..336e4fe29 100644 --- a/tests/procedure/test_rule_101.py +++ b/tests/procedure/test_rule_101.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_200.py b/tests/procedure/test_rule_200.py index 67da3d6f9..2d475c703 100644 --- a/tests/procedure/test_rule_200.py +++ b/tests/procedure/test_rule_200.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_200_test_input.fixed.vhd"), lExpected, False) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_401.py b/tests/procedure/test_rule_401.py index 0451b493c..57dd20a7d 100644 --- a/tests/procedure/test_rule_401.py +++ b/tests/procedure/test_rule_401.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_401_test_input.fixed.vhd"), lExpected, False) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_410.py b/tests/procedure/test_rule_410.py index 0283acbf5..b1b6fa937 100644 --- a/tests/procedure/test_rule_410.py +++ b/tests/procedure/test_rule_410.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_410_test_input.fixed.vhd"), lExpected) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_411.py b/tests/procedure/test_rule_411.py index 856c639f6..d88d1d2ea 100644 --- a/tests/procedure/test_rule_411.py +++ b/tests/procedure/test_rule_411.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_411_test_input.fixed.vhd"), lExpected) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_500.py b/tests/procedure/test_rule_500.py index 16a71ef79..b62ea3a10 100644 --- a/tests/procedure/test_rule_500.py +++ b/tests/procedure/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_501.py b/tests/procedure/test_rule_501.py index 1e3ea18c4..813cd34a0 100644 --- a/tests/procedure/test_rule_501.py +++ b/tests/procedure/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_502.py b/tests/procedure/test_rule_502.py index 7e1153149..e0ce2fe3a 100644 --- a/tests/procedure/test_rule_502.py +++ b/tests/procedure/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_503.py b/tests/procedure/test_rule_503.py index c180c6f09..449f42c13 100644 --- a/tests/procedure/test_rule_503.py +++ b/tests/procedure/test_rule_503.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_503_test_input.fixed_upper.vhd"), lExpected_upper) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_504.py b/tests/procedure/test_rule_504.py index f8ef29bb2..a35025f2a 100644 --- a/tests/procedure/test_rule_504.py +++ b/tests/procedure/test_rule_504.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_504_test_input.fixed_upper.vhd"), lExpected_upper) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_506.py b/tests/procedure/test_rule_506.py index 10bffe754..3a533a54b 100644 --- a/tests/procedure/test_rule_506.py +++ b/tests/procedure/test_rule_506.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_506_test_input.fixed_upper.vhd"), lExpected_upper) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_508.py b/tests/procedure/test_rule_508.py index 1589dd94a..2aed8500f 100644 --- a/tests/procedure/test_rule_508.py +++ b/tests/procedure/test_rule_508.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_508_test_input.fixed_upper.vhd"), lExpected_upper) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_509.py b/tests/procedure/test_rule_509.py index 67441cea0..65c9241a5 100644 --- a/tests/procedure/test_rule_509.py +++ b/tests/procedure/test_rule_509.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_509_test_input.fixed.vhd"), lExpected) -class test_procedure_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_510.py b/tests/procedure/test_rule_510.py index 920b005ae..6487ca42d 100644 --- a/tests/procedure/test_rule_510.py +++ b/tests/procedure/test_rule_510.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_510_test_input.fixed_upper.vhd"), lExpected_upper) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure/test_rule_511.py b/tests/procedure/test_rule_511.py index 8ffdeda84..a89e6e788 100644 --- a/tests/procedure/test_rule_511.py +++ b/tests/procedure/test_rule_511.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_511_test_input.fixed_upper.vhd"), lExpected_upper) -class test_function_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure_call/test_rule_001.py b/tests/procedure_call/test_rule_001.py index a50b2a560..8d1a1c362 100644 --- a/tests/procedure_call/test_rule_001.py +++ b/tests/procedure_call/test_rule_001.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected, False) -class test_procedure_call_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure_call/test_rule_002.py b/tests/procedure_call/test_rule_002.py index 0d88f3961..2852fe562 100644 --- a/tests/procedure_call/test_rule_002.py +++ b/tests/procedure_call/test_rule_002.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected, False) -class test_procedure_call_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure_call/test_rule_100.py b/tests/procedure_call/test_rule_100.py index 4923344e0..e3d590e7d 100644 --- a/tests/procedure_call/test_rule_100.py +++ b/tests/procedure_call/test_rule_100.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected, False) -class test_procedure_call_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure_call/test_rule_101.py b/tests/procedure_call/test_rule_101.py index 5a1eb0e17..f50eedf65 100644 --- a/tests/procedure_call/test_rule_101.py +++ b/tests/procedure_call/test_rule_101.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected, False) -class test_procedure_call_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure_call/test_rule_300.py b/tests/procedure_call/test_rule_300.py index 058a87008..e73fca86c 100644 --- a/tests/procedure_call/test_rule_300.py +++ b/tests/procedure_call/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected, False) -class test_procedure_call_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure_call/test_rule_301.py b/tests/procedure_call/test_rule_301.py index e5fb60bd7..0c6285ceb 100644 --- a/tests/procedure_call/test_rule_301.py +++ b/tests/procedure_call/test_rule_301.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_301_test_input.fixed.vhd"), lExpected, False) -class test_procedure_call_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure_call/test_rule_302.py b/tests/procedure_call/test_rule_302.py index 55bc4fe70..5e1ea2111 100644 --- a/tests/procedure_call/test_rule_302.py +++ b/tests/procedure_call/test_rule_302.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_302_test_input.fixed.vhd"), lExpected, False) -class test_procedure_call_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure_call/test_rule_400.py b/tests/procedure_call/test_rule_400.py index 70538f4bf..d7d7865e9 100644 --- a/tests/procedure_call/test_rule_400.py +++ b/tests/procedure_call/test_rule_400.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_400_test_input.fixed.vhd"), lExpected, False) -class test_procedure_call_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure_call/test_rule_401.py b/tests/procedure_call/test_rule_401.py index 4cba0cce0..1702ed8f4 100644 --- a/tests/procedure_call/test_rule_401.py +++ b/tests/procedure_call/test_rule_401.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_401_test_input.fixed.vhd"), lExpected, False) -class test_procedure_call_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure_call/test_rule_500.py b/tests/procedure_call/test_rule_500.py index 864d179d3..623168514 100644 --- a/tests/procedure_call/test_rule_500.py +++ b/tests/procedure_call/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_procedure_call_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure_call/test_rule_501.py b/tests/procedure_call/test_rule_501.py index 800c19752..398c813dd 100644 --- a/tests/procedure_call/test_rule_501.py +++ b/tests/procedure_call/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_procedure_call_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/procedure_call/test_rule_502.py b/tests/procedure_call/test_rule_502.py index 635d80464..3cd8f2194 100644 --- a/tests/procedure_call/test_rule_502.py +++ b/tests/procedure_call/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_procedure_call_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_001.py b/tests/process/test_rule_001.py index d46b29daa..0c2596ca4 100644 --- a/tests/process/test_rule_001.py +++ b/tests/process/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_002.py b/tests/process/test_rule_002.py index 46a6f6cc0..e87f202dc 100644 --- a/tests/process/test_rule_002.py +++ b/tests/process/test_rule_002.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_003.py b/tests/process/test_rule_003.py index 02bfdbe77..48d70764f 100644 --- a/tests/process/test_rule_003.py +++ b/tests/process/test_rule_003.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_004.py b/tests/process/test_rule_004.py index f4b9443ed..98d8843a6 100644 --- a/tests/process/test_rule_004.py +++ b/tests/process/test_rule_004.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed_upper.vhd"), lExpected_upper) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_005.py b/tests/process/test_rule_005.py index 3b070a852..3575d3bd7 100644 --- a/tests/process/test_rule_005.py +++ b/tests/process/test_rule_005.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed_upper.vhd"), lExpected_upper) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_006.py b/tests/process/test_rule_006.py index 730066558..ae92b9aa7 100644 --- a/tests/process/test_rule_006.py +++ b/tests/process/test_rule_006.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_007.py b/tests/process/test_rule_007.py index 1cf98ef7f..85c0d9078 100644 --- a/tests/process/test_rule_007.py +++ b/tests/process/test_rule_007.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_008.py b/tests/process/test_rule_008.py index 5182baa70..e69b5144b 100644 --- a/tests/process/test_rule_008.py +++ b/tests/process/test_rule_008.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed_upper.vhd"), lExpected_upper) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_009.py b/tests/process/test_rule_009.py index 9e3ff82b6..2bc132555 100644 --- a/tests/process/test_rule_009.py +++ b/tests/process/test_rule_009.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed_upper.vhd"), lExpected_upper) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_010.py b/tests/process/test_rule_010.py index 717781915..eabf5b2f9 100644 --- a/tests/process/test_rule_010.py +++ b/tests/process/test_rule_010.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed.vhd"), lExpected, False) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_011.py b/tests/process/test_rule_011.py index 2a11939d6..48a3b9fbb 100644 --- a/tests/process/test_rule_011.py +++ b/tests/process/test_rule_011.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_011_test_input.fixed.vhd"), lExpected, False) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_012.py b/tests/process/test_rule_012.py index 8f3be0cf2..bd94e6b85 100644 --- a/tests/process/test_rule_012.py +++ b/tests/process/test_rule_012.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_012_test_input.fixed_remove.vhd"), lExpected_remove) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_013.py b/tests/process/test_rule_013.py index 265763241..99955360e 100644 --- a/tests/process/test_rule_013.py +++ b/tests/process/test_rule_013.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_013_test_input.fixed_upper.vhd"), lExpected_upper) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_014.py b/tests/process/test_rule_014.py index 7cf488869..60c849ac6 100644 --- a/tests/process/test_rule_014.py +++ b/tests/process/test_rule_014.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_014_test_input.fixed.vhd"), lExpected) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_015.py b/tests/process/test_rule_015.py index 5bf9f3248..e692bfdb8 100644 --- a/tests/process/test_rule_015.py +++ b/tests/process/test_rule_015.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_015_test_input.fixed.vhd"), lExpected, False) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_016.py b/tests/process/test_rule_016.py index 281a4451a..448a8f833 100644 --- a/tests/process/test_rule_016.py +++ b/tests/process/test_rule_016.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_016_test_input.vhd")) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_017.py b/tests/process/test_rule_017.py index 6998f943f..4fa8308db 100644 --- a/tests/process/test_rule_017.py +++ b/tests/process/test_rule_017.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_017_test_input.fixed_upper.vhd"), lExpected_upper) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_018.py b/tests/process/test_rule_018.py index 1d0d594d2..c4a3d04b8 100644 --- a/tests/process/test_rule_018.py +++ b/tests/process/test_rule_018.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_018_test_input.fixed_remove.vhd"), lExpected_remove) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_019.py b/tests/process/test_rule_019.py index c83a200cd..8b6819406 100644 --- a/tests/process/test_rule_019.py +++ b/tests/process/test_rule_019.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_019_test_input.fixed_upper.vhd"), lExpected_upper) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_020.py b/tests/process/test_rule_020.py index beabae539..916c8b110 100644 --- a/tests/process/test_rule_020.py +++ b/tests/process/test_rule_020.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_020_test_input.fixed.vhd"), lExpected) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_021.py b/tests/process/test_rule_021.py index eea5e250e..1dddfe554 100644 --- a/tests/process/test_rule_021.py +++ b/tests/process/test_rule_021.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_021_test_input.fixed_require_blank.vhd"), lExpected_require_blank) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_022.py b/tests/process/test_rule_022.py index 955437370..10a728878 100644 --- a/tests/process/test_rule_022.py +++ b/tests/process/test_rule_022.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_022_test_input.fixed.vhd"), lExpected) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_023.py b/tests/process/test_rule_023.py index 9c9e9ad2a..08ee62395 100644 --- a/tests/process/test_rule_023.py +++ b/tests/process/test_rule_023.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_023_test_input.fixed.vhd"), lExpected) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_024.py b/tests/process/test_rule_024.py index 928ccce5e..00510d710 100644 --- a/tests/process/test_rule_024.py +++ b/tests/process/test_rule_024.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_024_test_input.vhd")) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_025.py b/tests/process/test_rule_025.py index f0e02b974..d29f85295 100644 --- a/tests/process/test_rule_025.py +++ b/tests/process/test_rule_025.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_025_test_input.fixed.vhd"), lExpected) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_026.py b/tests/process/test_rule_026.py index e1035b583..b034e7207 100644 --- a/tests/process/test_rule_026.py +++ b/tests/process/test_rule_026.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_026_test_input.fixed_require_blank.vhd"), lExpected_require_blank) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_027.py b/tests/process/test_rule_027.py index 9fe010a8c..ab5f18260 100644 --- a/tests/process/test_rule_027.py +++ b/tests/process/test_rule_027.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_027_test_input.fixed_no_blank.vhd"), lExpected_no_blank) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_028.py b/tests/process/test_rule_028.py index e2d93aec1..5168aff4b 100644 --- a/tests/process/test_rule_028.py +++ b/tests/process/test_rule_028.py @@ -22,7 +22,7 @@ utils.read_file(os.path.join(sTestDir, "rule_028_test_input.fixed_smart_tabs.vhd"), lExpected_smart_tabs) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_029.py b/tests/process/test_rule_029.py index aa2c1bfc1..31ece4968 100644 --- a/tests/process/test_rule_029.py +++ b/tests/process/test_rule_029.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_029_test_input.fixed_edge.vhd"), lExpected_edge) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_030.py b/tests/process/test_rule_030.py index 5f9a4063c..6e7db609f 100644 --- a/tests/process/test_rule_030.py +++ b/tests/process/test_rule_030.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_030_test_input.vhd")) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_031.py b/tests/process/test_rule_031.py index 1fdccc987..e9c3c51bd 100644 --- a/tests/process/test_rule_031.py +++ b/tests/process/test_rule_031.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_031_test_input.fixed.vhd"), lExpected) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_033.py b/tests/process/test_rule_033.py index 14034a8f9..52ca2863c 100644 --- a/tests/process/test_rule_033.py +++ b/tests/process/test_rule_033.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_033_test_input.fixed.vhd"), lExpected) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_034.py b/tests/process/test_rule_034.py index 411e1f07a..7d70abc88 100644 --- a/tests/process/test_rule_034.py +++ b/tests/process/test_rule_034.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_034_test_input.fixed.vhd"), lExpected) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_035.py b/tests/process/test_rule_035.py index 48ab67902..c37c6abac 100644 --- a/tests/process/test_rule_035.py +++ b/tests/process/test_rule_035.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_035_test_input.fixed_compact_alignment_false.vhd"), lExpectedCompactAlignmentFalse) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_035_smart_tabs.py b/tests/process/test_rule_035_smart_tabs.py index bd7cc7a53..3d804faf9 100644 --- a/tests/process/test_rule_035_smart_tabs.py +++ b/tests/process/test_rule_035_smart_tabs.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_035_test_input_smart_tabs.fixed_indent_4.vhd"), lExpected_indent_4) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_036.py b/tests/process/test_rule_036.py index 34f898375..d34a12e63 100644 --- a/tests/process/test_rule_036.py +++ b/tests/process/test_rule_036.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_036_test_input.vhd")) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_037.py b/tests/process/test_rule_037.py index 5626321ff..2e6f552b1 100644 --- a/tests/process/test_rule_037.py +++ b/tests/process/test_rule_037.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_037_test_input.fixed.vhd"), lExpected, False) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_038.py b/tests/process/test_rule_038.py index f2b8b83e2..327248a36 100644 --- a/tests/process/test_rule_038.py +++ b/tests/process/test_rule_038.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_038_test_input.fixed.vhd"), lExpected, False) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_039.py b/tests/process/test_rule_039.py index 0ad426d12..08d4c5d35 100644 --- a/tests/process/test_rule_039.py +++ b/tests/process/test_rule_039.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_039_test_input.fixed.vhd"), lExpected, False) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/process/test_rule_600.py b/tests/process/test_rule_600.py index f1eebe35e..3571b7a0d 100644 --- a/tests/process/test_rule_600.py +++ b/tests/process/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_process_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/protected_type/test_rule_300.py b/tests/protected_type/test_rule_300.py index e1a2f7ef8..d0fac661b 100644 --- a/tests/protected_type/test_rule_300.py +++ b/tests/protected_type/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_protected_type_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/protected_type/test_rule_500.py b/tests/protected_type/test_rule_500.py index 485c75f9f..565cf94a0 100644 --- a/tests/protected_type/test_rule_500.py +++ b/tests/protected_type/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_protected_type_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/protected_type/test_rule_501.py b/tests/protected_type/test_rule_501.py index 5eeb9d7d2..ced847064 100644 --- a/tests/protected_type/test_rule_501.py +++ b/tests/protected_type/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_protected_type_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/protected_type/test_rule_502.py b/tests/protected_type/test_rule_502.py index 2507826db..227a6ec39 100644 --- a/tests/protected_type/test_rule_502.py +++ b/tests/protected_type/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_protected_type_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/protected_type_body/test_rule_300.py b/tests/protected_type_body/test_rule_300.py index d52c1d956..48958bb33 100644 --- a/tests/protected_type_body/test_rule_300.py +++ b/tests/protected_type_body/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_protected_type_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/protected_type_body/test_rule_400.py b/tests/protected_type_body/test_rule_400.py index 53b458603..fa03f6169 100644 --- a/tests/protected_type_body/test_rule_400.py +++ b/tests/protected_type_body/test_rule_400.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_400_test_input.fixed.vhd"), lExpected) -class test_protected_type_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/protected_type_body/test_rule_401.py b/tests/protected_type_body/test_rule_401.py index b7204c9eb..580d3b24f 100644 --- a/tests/protected_type_body/test_rule_401.py +++ b/tests/protected_type_body/test_rule_401.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_401_test_input.fixed.vhd"), lExpected) -class test_protected_type_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/protected_type_body/test_rule_402.py b/tests/protected_type_body/test_rule_402.py index b2a93dcc2..56d04f29f 100644 --- a/tests/protected_type_body/test_rule_402.py +++ b/tests/protected_type_body/test_rule_402.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_402_test_input.fixed.vhd"), lExpected) -class test_protected_type_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/protected_type_body/test_rule_500.py b/tests/protected_type_body/test_rule_500.py index 876fded42..1fea5b744 100644 --- a/tests/protected_type_body/test_rule_500.py +++ b/tests/protected_type_body/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_protected_type_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/protected_type_body/test_rule_501.py b/tests/protected_type_body/test_rule_501.py index 7a10bb684..d37f1dc32 100644 --- a/tests/protected_type_body/test_rule_501.py +++ b/tests/protected_type_body/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_protected_type_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/protected_type_body/test_rule_502.py b/tests/protected_type_body/test_rule_502.py index a698d4556..f2d69ce29 100644 --- a/tests/protected_type_body/test_rule_502.py +++ b/tests/protected_type_body/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_protected_type_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/protected_type_body/test_rule_503.py b/tests/protected_type_body/test_rule_503.py index 733c1233e..7e337c6ec 100644 --- a/tests/protected_type_body/test_rule_503.py +++ b/tests/protected_type_body/test_rule_503.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_503_test_input.fixed_upper.vhd"), lExpected_upper) -class test_protected_type_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/protected_type_body/test_rule_504.py b/tests/protected_type_body/test_rule_504.py index ddbf92193..27843e477 100644 --- a/tests/protected_type_body/test_rule_504.py +++ b/tests/protected_type_body/test_rule_504.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_504_test_input.fixed_upper.vhd"), lExpected_upper) -class test_protected_type_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/ranges/test_rule_001.py b/tests/ranges/test_rule_001.py index 0a269acc3..6184174a8 100644 --- a/tests/ranges/test_rule_001.py +++ b/tests/ranges/test_rule_001.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed_upper.vhd"), lExpected_upper) -class test_ranges_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/ranges/test_rule_002.py b/tests/ranges/test_rule_002.py index afdfcda18..651b69009 100644 --- a/tests/ranges/test_rule_002.py +++ b/tests/ranges/test_rule_002.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed_upper.vhd"), lExpected_upper) -class test_ranges_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/record_type_definition/test_rule_002.py b/tests/record_type_definition/test_rule_002.py index 2875eba23..8030af524 100644 --- a/tests/record_type_definition/test_rule_002.py +++ b/tests/record_type_definition/test_rule_002.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected, False) -class test_record_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/record_type_definition/test_rule_003.py b/tests/record_type_definition/test_rule_003.py index b3ac70163..1175f1972 100644 --- a/tests/record_type_definition/test_rule_003.py +++ b/tests/record_type_definition/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected, False) -class test_record_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/record_type_definition/test_rule_004.py b/tests/record_type_definition/test_rule_004.py index 3f7bbbad0..caf4fbe9c 100644 --- a/tests/record_type_definition/test_rule_004.py +++ b/tests/record_type_definition/test_rule_004.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected, False) -class test_record_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/record_type_definition/test_rule_005.py b/tests/record_type_definition/test_rule_005.py index 6f7409b07..965b2fd05 100644 --- a/tests/record_type_definition/test_rule_005.py +++ b/tests/record_type_definition/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected, False) -class test_record_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/record_type_definition/test_rule_006.py b/tests/record_type_definition/test_rule_006.py index d87d8cce9..2f9d99c41 100644 --- a/tests/record_type_definition/test_rule_006.py +++ b/tests/record_type_definition/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected, False) -class test_record_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/record_type_definition/test_rule_007.py b/tests/record_type_definition/test_rule_007.py index f77b9789e..9c9047c09 100644 --- a/tests/record_type_definition/test_rule_007.py +++ b/tests/record_type_definition/test_rule_007.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected, False) -class test_record_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/record_type_definition/test_rule_100.py b/tests/record_type_definition/test_rule_100.py index 9dc1a38e3..b09792653 100644 --- a/tests/record_type_definition/test_rule_100.py +++ b/tests/record_type_definition/test_rule_100.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected, False) -class test_record_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/record_type_definition/test_rule_101.py b/tests/record_type_definition/test_rule_101.py index 79ed8d038..9b5d3d8a4 100644 --- a/tests/record_type_definition/test_rule_101.py +++ b/tests/record_type_definition/test_rule_101.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected, False) -class test_record_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/record_type_definition/test_rule_200.py b/tests/record_type_definition/test_rule_200.py index 27d1e3b8d..1260a0975 100644 --- a/tests/record_type_definition/test_rule_200.py +++ b/tests/record_type_definition/test_rule_200.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_200_test_input.fixed.vhd"), lExpected, False) -class test_record_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/record_type_definition/test_rule_201.py b/tests/record_type_definition/test_rule_201.py index fbcb34320..92d66df50 100644 --- a/tests/record_type_definition/test_rule_201.py +++ b/tests/record_type_definition/test_rule_201.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_201_test_input.fixed.vhd"), lExpected, False) -class test_record_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/record_type_definition/test_rule_300.py b/tests/record_type_definition/test_rule_300.py index 4362706b4..68a6d7da0 100644 --- a/tests/record_type_definition/test_rule_300.py +++ b/tests/record_type_definition/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected, False) -class test_record_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/record_type_definition/test_rule_301.py b/tests/record_type_definition/test_rule_301.py index 99b0a51e5..5fe56854f 100644 --- a/tests/record_type_definition/test_rule_301.py +++ b/tests/record_type_definition/test_rule_301.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_301_test_input.fixed.vhd"), lExpected, False) -class test_record_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/report_statement/test_rule_001.py b/tests/report_statement/test_rule_001.py index f0f48a210..b9cf07285 100644 --- a/tests/report_statement/test_rule_001.py +++ b/tests/report_statement/test_rule_001.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/report_statement/test_rule_002.py b/tests/report_statement/test_rule_002.py index 1a146b7a7..07aec2db0 100644 --- a/tests/report_statement/test_rule_002.py +++ b/tests/report_statement/test_rule_002.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/report_statement/test_rule_100.py b/tests/report_statement/test_rule_100.py index 5e16119a0..f963a27a2 100644 --- a/tests/report_statement/test_rule_100.py +++ b/tests/report_statement/test_rule_100.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/report_statement/test_rule_101.py b/tests/report_statement/test_rule_101.py index 472557686..f20c8e6e9 100644 --- a/tests/report_statement/test_rule_101.py +++ b/tests/report_statement/test_rule_101.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/report_statement/test_rule_300.py b/tests/report_statement/test_rule_300.py index 32921d9f9..9b6fb2513 100644 --- a/tests/report_statement/test_rule_300.py +++ b/tests/report_statement/test_rule_300.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_assert_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/report_statement/test_rule_400.py b/tests/report_statement/test_rule_400.py index cf0966014..70794418e 100644 --- a/tests/report_statement/test_rule_400.py +++ b/tests/report_statement/test_rule_400.py @@ -24,7 +24,7 @@ utils.read_file(os.path.join(sTestDir, "rule_400_test_input.fixed_left_aligned.vhd"), lExpected_left_aligned) -class test_report_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/report_statement/test_rule_500.py b/tests/report_statement/test_rule_500.py index aab720374..3556efd9b 100644 --- a/tests/report_statement/test_rule_500.py +++ b/tests/report_statement/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_report_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/report_statement/test_rule_501.py b/tests/report_statement/test_rule_501.py index 0214bcc55..120300044 100644 --- a/tests/report_statement/test_rule_501.py +++ b/tests/report_statement/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_report_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/reserved/test_rule_001.py b/tests/reserved/test_rule_001.py index 4da5d436c..2770fe570 100644 --- a/tests/reserved/test_rule_001.py +++ b/tests/reserved/test_rule_001.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_001_test_input.vhd")) -class test_reserved_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/return_statement/test_rule_300.py b/tests/return_statement/test_rule_300.py index eec1d7790..6c5b9299c 100644 --- a/tests/return_statement/test_rule_300.py +++ b/tests/return_statement/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_return_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/return_statement/test_rule_301.py b/tests/return_statement/test_rule_301.py index 0267ba4e2..af1b2e8dc 100644 --- a/tests/return_statement/test_rule_301.py +++ b/tests/return_statement/test_rule_301.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_301_test_input.fixed.vhd"), lExpected) -class test_return_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/return_statement/test_rule_500.py b/tests/return_statement/test_rule_500.py index 69084d02c..622dede99 100644 --- a/tests/return_statement/test_rule_500.py +++ b/tests/return_statement/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_return_statement_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/selected_assignment/test_rule_500.py b/tests/selected_assignment/test_rule_500.py index 735fddcba..f4a394e88 100644 --- a/tests/selected_assignment/test_rule_500.py +++ b/tests/selected_assignment/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_selected_assignment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/selected_assignment/test_rule_501.py b/tests/selected_assignment/test_rule_501.py index 0fa3e1f1f..db6978ad2 100644 --- a/tests/selected_assignment/test_rule_501.py +++ b/tests/selected_assignment/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_selected_assignment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/selected_assignment/test_rule_502.py b/tests/selected_assignment/test_rule_502.py index f62750ef0..c302e5302 100644 --- a/tests/selected_assignment/test_rule_502.py +++ b/tests/selected_assignment/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_selected_assignment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/selected_assignment/test_rule_503.py b/tests/selected_assignment/test_rule_503.py index 71ae6a18e..30f702c69 100644 --- a/tests/selected_assignment/test_rule_503.py +++ b/tests/selected_assignment/test_rule_503.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_503_test_input.fixed_upper.vhd"), lExpected_upper) -class test_selected_assignment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/sequential/test_rule_001.py b/tests/sequential/test_rule_001.py index 6681f5fa9..34dc0166e 100644 --- a/tests/sequential/test_rule_001.py +++ b/tests/sequential/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_sequential_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/sequential/test_rule_002.py b/tests/sequential/test_rule_002.py index 3fc0480dc..f967015e3 100644 --- a/tests/sequential/test_rule_002.py +++ b/tests/sequential/test_rule_002.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_sequential_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/sequential/test_rule_003.py b/tests/sequential/test_rule_003.py index a0d3cd311..c63ae746f 100644 --- a/tests/sequential/test_rule_003.py +++ b/tests/sequential/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_sequential_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/sequential/test_rule_004.py b/tests/sequential/test_rule_004.py index 01b3c37b9..8026bae67 100644 --- a/tests/sequential/test_rule_004.py +++ b/tests/sequential/test_rule_004.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected) -class test_sequential_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/sequential/test_rule_006.py b/tests/sequential/test_rule_006.py index 1087279ce..0f83f484c 100644 --- a/tests/sequential/test_rule_006.py +++ b/tests/sequential/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_sequential_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/sequential/test_rule_007.py b/tests/sequential/test_rule_007.py index 130020930..ef2e2c328 100644 --- a/tests/sequential/test_rule_007.py +++ b/tests/sequential/test_rule_007.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected) -class test_sequential_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/sequential/test_rule_008.py b/tests/sequential/test_rule_008.py index 48c23429b..7efb5894d 100644 --- a/tests/sequential/test_rule_008.py +++ b/tests/sequential/test_rule_008.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed_new_line_after_assign_no.vhd"), lExpected_new_line_after_assign_no) -class test_sequential_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/sequential/test_rule_009.py b/tests/sequential/test_rule_009.py index a9e5732ff..d1f5b10a4 100644 --- a/tests/sequential/test_rule_009.py +++ b/tests/sequential/test_rule_009.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed.vhd"), lExpected) -class test_sequential_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/sequential/test_rule_400.py b/tests/sequential/test_rule_400.py index f59908921..834202fd4 100644 --- a/tests/sequential/test_rule_400.py +++ b/tests/sequential/test_rule_400.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_400_test_input.fixed.vhd"), lExpected) -class test_sequential_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/sequential/test_rule_401.py b/tests/sequential/test_rule_401.py index af587623d..8b07b6589 100644 --- a/tests/sequential/test_rule_401.py +++ b/tests/sequential/test_rule_401.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_401_test_input.fixed.vhd"), lExpected) -class test_sequential_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/sequential/test_rule_402.py b/tests/sequential/test_rule_402.py index e4cfcf746..bdeb82ed8 100644 --- a/tests/sequential/test_rule_402.py +++ b/tests/sequential/test_rule_402.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_402_test_input.fixed.vhd"), lExpected) -class test_sequential_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/shift_operator/test_rule_500.py b/tests/shift_operator/test_rule_500.py index 72bf01628..59a9c6bfb 100644 --- a/tests/shift_operator/test_rule_500.py +++ b/tests/shift_operator/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_shift_operator_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/signal/test_rule_001.py b/tests/signal/test_rule_001.py index 989a8a5d2..256830e54 100644 --- a/tests/signal/test_rule_001.py +++ b/tests/signal/test_rule_001.py @@ -22,7 +22,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed_smart_tabs.vhd"), lExpected_smart_tabs) -class test_signal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/signal/test_rule_002.py b/tests/signal/test_rule_002.py index 4e89b248b..3438c1850 100644 --- a/tests/signal/test_rule_002.py +++ b/tests/signal/test_rule_002.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed_upper.vhd"), lExpected_upper) -class test_signal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/signal/test_rule_004.py b/tests/signal/test_rule_004.py index 18ac83fab..ed3564a9b 100644 --- a/tests/signal/test_rule_004.py +++ b/tests/signal/test_rule_004.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed_upper.vhd"), lExpected_upper) -class test_signal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/signal/test_rule_005.py b/tests/signal/test_rule_005.py index 2d6c84dad..03daf6b98 100644 --- a/tests/signal/test_rule_005.py +++ b/tests/signal/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_signal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/signal/test_rule_006.py b/tests/signal/test_rule_006.py index 1d40d218a..98f3c9d95 100644 --- a/tests/signal/test_rule_006.py +++ b/tests/signal/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_signal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/signal/test_rule_007.py b/tests/signal/test_rule_007.py index bf2c75f0c..07ab8a7c4 100644 --- a/tests/signal/test_rule_007.py +++ b/tests/signal/test_rule_007.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_007_test_input.vhd")) -class test_signal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/signal/test_rule_008.py b/tests/signal/test_rule_008.py index 0bed6d8b3..d979dbe13 100644 --- a/tests/signal/test_rule_008.py +++ b/tests/signal/test_rule_008.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_008_test_input.vhd")) -class test_signal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/signal/test_rule_012.py b/tests/signal/test_rule_012.py index f636618f2..4324e0886 100644 --- a/tests/signal/test_rule_012.py +++ b/tests/signal/test_rule_012.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_012_test_input.vhd")) -class test_signal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/signal/test_rule_015.py b/tests/signal/test_rule_015.py index e52099d31..e1bcf669c 100644 --- a/tests/signal/test_rule_015.py +++ b/tests/signal/test_rule_015.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_015_test_input.fixed.vhd"), lExpected) -class test_signal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/signal/test_rule_100.py b/tests/signal/test_rule_100.py index 782235de5..ffd90c2b0 100644 --- a/tests/signal/test_rule_100.py +++ b/tests/signal/test_rule_100.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_signal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/signal/test_rule_101.py b/tests/signal/test_rule_101.py index 7cb2811d1..13ccb6210 100644 --- a/tests/signal/test_rule_101.py +++ b/tests/signal/test_rule_101.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_signal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/signal/test_rule_102.py b/tests/signal/test_rule_102.py index 49fe8ac0a..a866a16db 100644 --- a/tests/signal/test_rule_102.py +++ b/tests/signal/test_rule_102.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_102_test_input.fixed.vhd"), lExpected) -class test_signal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/signal/test_rule_200.py b/tests/signal/test_rule_200.py index 1fe1ffce1..64e04b246 100644 --- a/tests/signal/test_rule_200.py +++ b/tests/signal/test_rule_200.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_200_test_input.fixed.vhd"), lExpected) -class test_signal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/signal/test_rule_400.py b/tests/signal/test_rule_400.py index c1f417e8f..f65df04f8 100644 --- a/tests/signal/test_rule_400.py +++ b/tests/signal/test_rule_400.py @@ -30,7 +30,7 @@ utils.read_file(os.path.join(sTestDir, "rule_400_test_input.fixed__align_left_no__align_paren_no.vhd"), lExpected__align_left_no__align_paren_no) -class test_signal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/signal/test_rule_600.py b/tests/signal/test_rule_600.py index 31cecedd6..d44401cd1 100644 --- a/tests/signal/test_rule_600.py +++ b/tests/signal/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_signal_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subprogram_body/test_rule_201.py b/tests/subprogram_body/test_rule_201.py index f8423a0e2..b8ad49f35 100644 --- a/tests/subprogram_body/test_rule_201.py +++ b/tests/subprogram_body/test_rule_201.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_201_test_input.fixed.vhd"), lExpected, False) -class test_subprogram_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subprogram_body/test_rule_202.py b/tests/subprogram_body/test_rule_202.py index 056c54284..30a816faa 100644 --- a/tests/subprogram_body/test_rule_202.py +++ b/tests/subprogram_body/test_rule_202.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_202_test_input.fixed.vhd"), lExpected, False) -class test_subprogram_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subprogram_body/test_rule_203.py b/tests/subprogram_body/test_rule_203.py index 3d89a34b6..df76af0b2 100644 --- a/tests/subprogram_body/test_rule_203.py +++ b/tests/subprogram_body/test_rule_203.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_203_test_input.fixed.vhd"), lExpected, False) -class test_subprogram_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subprogram_body/test_rule_204.py b/tests/subprogram_body/test_rule_204.py index c8f1e5129..ec684f51d 100644 --- a/tests/subprogram_body/test_rule_204.py +++ b/tests/subprogram_body/test_rule_204.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_204_test_input.fixed.vhd"), lExpected, False) -class test_subprogram_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subprogram_body/test_rule_205.py b/tests/subprogram_body/test_rule_205.py index 9fa4a2ed9..620d183e3 100644 --- a/tests/subprogram_body/test_rule_205.py +++ b/tests/subprogram_body/test_rule_205.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_205_test_input.fixed.vhd"), lExpected, False) -class test_subprogram_body_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subprogram_instantiation/test_rule_100.py b/tests/subprogram_instantiation/test_rule_100.py index e4db5a943..8e04be1c9 100644 --- a/tests/subprogram_instantiation/test_rule_100.py +++ b/tests/subprogram_instantiation/test_rule_100.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_subprogram_instantiation_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subtype/test_rule_001.py b/tests/subtype/test_rule_001.py index 4d34a07d1..c2c4fc285 100644 --- a/tests/subtype/test_rule_001.py +++ b/tests/subtype/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_subtype_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subtype/test_rule_004.py b/tests/subtype/test_rule_004.py index 7f69a2e45..e7152ce70 100644 --- a/tests/subtype/test_rule_004.py +++ b/tests/subtype/test_rule_004.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_004_test_input.vhd")) -class test_subtype_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subtype/test_rule_005.py b/tests/subtype/test_rule_005.py index 9d310d518..3668a3f5b 100644 --- a/tests/subtype/test_rule_005.py +++ b/tests/subtype/test_rule_005.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subtype/test_rule_100.py b/tests/subtype/test_rule_100.py index 281637a99..925b2d062 100644 --- a/tests/subtype/test_rule_100.py +++ b/tests/subtype/test_rule_100.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_subtype_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subtype/test_rule_101.py b/tests/subtype/test_rule_101.py index ae3ff1a02..6a53abc7b 100644 --- a/tests/subtype/test_rule_101.py +++ b/tests/subtype/test_rule_101.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_subtype_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subtype/test_rule_102.py b/tests/subtype/test_rule_102.py index 4fb3aae45..3d82cb537 100644 --- a/tests/subtype/test_rule_102.py +++ b/tests/subtype/test_rule_102.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_102_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subtype/test_rule_200.py b/tests/subtype/test_rule_200.py index 448b877ae..a779181bc 100644 --- a/tests/subtype/test_rule_200.py +++ b/tests/subtype/test_rule_200.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_200_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subtype/test_rule_201.py b/tests/subtype/test_rule_201.py index 46f1278f3..6039f23f3 100644 --- a/tests/subtype/test_rule_201.py +++ b/tests/subtype/test_rule_201.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_201_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subtype/test_rule_202.py b/tests/subtype/test_rule_202.py index d23690cde..99e1f8587 100644 --- a/tests/subtype/test_rule_202.py +++ b/tests/subtype/test_rule_202.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_202_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subtype/test_rule_500.py b/tests/subtype/test_rule_500.py index 1120c8f2d..4d336e568 100644 --- a/tests/subtype/test_rule_500.py +++ b/tests/subtype/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_subtype_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subtype/test_rule_501.py b/tests/subtype/test_rule_501.py index def748a53..bff4fea4f 100644 --- a/tests/subtype/test_rule_501.py +++ b/tests/subtype/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_subtype_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subtype/test_rule_502.py b/tests/subtype/test_rule_502.py index 00ae84d96..5234d2f6c 100644 --- a/tests/subtype/test_rule_502.py +++ b/tests/subtype/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_subtype_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/subtype/test_rule_600.py b/tests/subtype/test_rule_600.py index 091e4df7e..3d6b2ceb2 100644 --- a/tests/subtype/test_rule_600.py +++ b/tests/subtype/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_subtype_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_001.py b/tests/type_definition/test_rule_001.py index ca272b69c..ade4a1904 100644 --- a/tests/type_definition/test_rule_001.py +++ b/tests/type_definition/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_002.py b/tests/type_definition/test_rule_002.py index 9c7441937..4d4394f2c 100644 --- a/tests/type_definition/test_rule_002.py +++ b/tests/type_definition/test_rule_002.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed_upper.vhd"), lExpected_upper) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_004.py b/tests/type_definition/test_rule_004.py index 34c042ce7..ef997e183 100644 --- a/tests/type_definition/test_rule_004.py +++ b/tests/type_definition/test_rule_004.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed_upper.vhd"), lExpected_upper) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_005.py b/tests/type_definition/test_rule_005.py index b55efbdb7..4a0df3d56 100644 --- a/tests/type_definition/test_rule_005.py +++ b/tests/type_definition/test_rule_005.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_006.py b/tests/type_definition/test_rule_006.py index 306d1f42c..d7dceb61a 100644 --- a/tests/type_definition/test_rule_006.py +++ b/tests/type_definition/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_007.py b/tests/type_definition/test_rule_007.py index a96816b08..11c013e53 100644 --- a/tests/type_definition/test_rule_007.py +++ b/tests/type_definition/test_rule_007.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_008.py b/tests/type_definition/test_rule_008.py index cf7e1e4a7..e84e24dc8 100644 --- a/tests/type_definition/test_rule_008.py +++ b/tests/type_definition/test_rule_008.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_009.py b/tests/type_definition/test_rule_009.py index 66b6a517b..ddf889410 100644 --- a/tests/type_definition/test_rule_009.py +++ b/tests/type_definition/test_rule_009.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_009_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_010.py b/tests/type_definition/test_rule_010.py index 26424fd0a..d3745e344 100644 --- a/tests/type_definition/test_rule_010.py +++ b/tests/type_definition/test_rule_010.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_011.py b/tests/type_definition/test_rule_011.py index 939e861a2..a22fc66e3 100644 --- a/tests/type_definition/test_rule_011.py +++ b/tests/type_definition/test_rule_011.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_011_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_012.py b/tests/type_definition/test_rule_012.py index 2941757b6..a3005c9b9 100644 --- a/tests/type_definition/test_rule_012.py +++ b/tests/type_definition/test_rule_012.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_012_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_013.py b/tests/type_definition/test_rule_013.py index a6ce156bc..f9d96e91c 100644 --- a/tests/type_definition/test_rule_013.py +++ b/tests/type_definition/test_rule_013.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_013_test_input.fixed_upper.vhd"), lExpected_upper) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_015.py b/tests/type_definition/test_rule_015.py index e5b1b7f1c..0a37df233 100644 --- a/tests/type_definition/test_rule_015.py +++ b/tests/type_definition/test_rule_015.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_015_test_input.vhd")) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_016.py b/tests/type_definition/test_rule_016.py index a83564684..acbf58b83 100644 --- a/tests/type_definition/test_rule_016.py +++ b/tests/type_definition/test_rule_016.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_016_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_017.py b/tests/type_definition/test_rule_017.py index 2b79c42ef..2467646aa 100644 --- a/tests/type_definition/test_rule_017.py +++ b/tests/type_definition/test_rule_017.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_017_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_018.py b/tests/type_definition/test_rule_018.py index 256aad782..705277c15 100644 --- a/tests/type_definition/test_rule_018.py +++ b/tests/type_definition/test_rule_018.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_018_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_100.py b/tests/type_definition/test_rule_100.py index 29acdcb39..f237c7fb0 100644 --- a/tests/type_definition/test_rule_100.py +++ b/tests/type_definition/test_rule_100.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_200.py b/tests/type_definition/test_rule_200.py index 44b3bcc5d..0eaf1d07c 100644 --- a/tests/type_definition/test_rule_200.py +++ b/tests/type_definition/test_rule_200.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_200_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_400.py b/tests/type_definition/test_rule_400.py index 366a4b0ac..bdfa89620 100644 --- a/tests/type_definition/test_rule_400.py +++ b/tests/type_definition/test_rule_400.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_400_test_input.fixed.vhd"), lExpected) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_definition/test_rule_600.py b/tests/type_definition/test_rule_600.py index f969ea738..facad4653 100644 --- a/tests/type_definition/test_rule_600.py +++ b/tests/type_definition/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/type_mark/test_rule_500.py b/tests/type_mark/test_rule_500.py index 98d8f3083..5c77a06c0 100644 --- a/tests/type_mark/test_rule_500.py +++ b/tests/type_mark/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_type_definition_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/use_clause/test_rule_500.py b/tests/use_clause/test_rule_500.py index 56de98761..98d39087f 100644 --- a/tests/use_clause/test_rule_500.py +++ b/tests/use_clause/test_rule_500.py @@ -28,7 +28,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper_with_exceptions.vhd"), lExpected_upper_with_exceptions) -class test_use_clause_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/use_clause/test_rule_501.py b/tests/use_clause/test_rule_501.py index 829707a29..382634be2 100644 --- a/tests/use_clause/test_rule_501.py +++ b/tests/use_clause/test_rule_501.py @@ -28,7 +28,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper_with_exceptions.vhd"), lExpected_upper_with_exceptions) -class test_use_clause_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/use_clause/test_rule_502.py b/tests/use_clause/test_rule_502.py index 5e018c969..cb6ba1e06 100644 --- a/tests/use_clause/test_rule_502.py +++ b/tests/use_clause/test_rule_502.py @@ -28,7 +28,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper_with_exceptions.vhd"), lExpected_upper_with_exceptions) -class test_use_clause_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/use_clause/test_rule_503.py b/tests/use_clause/test_rule_503.py index 95835b711..bf043c1c4 100644 --- a/tests/use_clause/test_rule_503.py +++ b/tests/use_clause/test_rule_503.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_503_test_input.fixed_upper.vhd"), lExpected_upper) -class test_use_clause_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable/test_rule_001.py b/tests/variable/test_rule_001.py index 030612f3b..7dd7b0007 100644 --- a/tests/variable/test_rule_001.py +++ b/tests/variable/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_variable_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable/test_rule_002.py b/tests/variable/test_rule_002.py index 2cd84eefb..af5d1593a 100644 --- a/tests/variable/test_rule_002.py +++ b/tests/variable/test_rule_002.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed_upper.vhd"), lExpected_upper) -class test_variable_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable/test_rule_004.py b/tests/variable/test_rule_004.py index edc5eda63..185e13f78 100644 --- a/tests/variable/test_rule_004.py +++ b/tests/variable/test_rule_004.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed_upper.vhd"), lExpected_upper) -class test_variable_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable/test_rule_005.py b/tests/variable/test_rule_005.py index 9a177d2bd..d5dbe3ff8 100644 --- a/tests/variable/test_rule_005.py +++ b/tests/variable/test_rule_005.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_variable_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable/test_rule_006.py b/tests/variable/test_rule_006.py index 0ab00e993..394ed44a5 100644 --- a/tests/variable/test_rule_006.py +++ b/tests/variable/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_variable_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable/test_rule_007.py b/tests/variable/test_rule_007.py index 6f9b4de52..6a97bef28 100644 --- a/tests/variable/test_rule_007.py +++ b/tests/variable/test_rule_007.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_007_test_input.vhd")) -class test_variable_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable/test_rule_012.py b/tests/variable/test_rule_012.py index acc60d898..340da5d94 100644 --- a/tests/variable/test_rule_012.py +++ b/tests/variable/test_rule_012.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_012_test_input.vhd")) -class test_variable_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable/test_rule_100.py b/tests/variable/test_rule_100.py index d82db93f7..3d17d8b1c 100644 --- a/tests/variable/test_rule_100.py +++ b/tests/variable/test_rule_100.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_100_test_input.fixed.vhd"), lExpected) -class test_variable_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable/test_rule_400.py b/tests/variable/test_rule_400.py index 1776a7820..f41ee3544 100644 --- a/tests/variable/test_rule_400.py +++ b/tests/variable/test_rule_400.py @@ -30,7 +30,7 @@ utils.read_file(os.path.join(sTestDir, "rule_400_test_input.fixed__align_left_no__align_paren_no.vhd"), lExpected__align_left_no__align_paren_no) -class test_variable_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable/test_rule_600.py b/tests/variable/test_rule_600.py index 887ea53f8..dbd1c9f7a 100644 --- a/tests/variable/test_rule_600.py +++ b/tests/variable/test_rule_600.py @@ -12,7 +12,7 @@ lFile, eError = vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir, "rule_600_test_input.vhd")) -class test_variable_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable_assignment/test_rule_001.py b/tests/variable_assignment/test_rule_001.py index 1a153a922..8c0ecfd5c 100644 --- a/tests/variable_assignment/test_rule_001.py +++ b/tests/variable_assignment/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_variable_assignment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable_assignment/test_rule_002.py b/tests/variable_assignment/test_rule_002.py index 2921a06cd..b3d6bd77e 100644 --- a/tests/variable_assignment/test_rule_002.py +++ b/tests/variable_assignment/test_rule_002.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_002_test_input.fixed.vhd"), lExpected) -class test_variable_assignment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable_assignment/test_rule_003.py b/tests/variable_assignment/test_rule_003.py index 9e991309b..679542b44 100644 --- a/tests/variable_assignment/test_rule_003.py +++ b/tests/variable_assignment/test_rule_003.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_variable_assignment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable_assignment/test_rule_004.py b/tests/variable_assignment/test_rule_004.py index 7a726b726..852c0d473 100644 --- a/tests/variable_assignment/test_rule_004.py +++ b/tests/variable_assignment/test_rule_004.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected) -class test_variable_assignment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable_assignment/test_rule_006.py b/tests/variable_assignment/test_rule_006.py index 9593e00d2..53ab3dec2 100644 --- a/tests/variable_assignment/test_rule_006.py +++ b/tests/variable_assignment/test_rule_006.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_variable_assignment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable_assignment/test_rule_007.py b/tests/variable_assignment/test_rule_007.py index e0ed41a78..03840801e 100644 --- a/tests/variable_assignment/test_rule_007.py +++ b/tests/variable_assignment/test_rule_007.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed_new_line_after_assign_no.vhd"), lExpected_new_line_after_assign_no) -class test_variable_assignment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable_assignment/test_rule_008.py b/tests/variable_assignment/test_rule_008.py index 3d670d51b..ae02b39b3 100644 --- a/tests/variable_assignment/test_rule_008.py +++ b/tests/variable_assignment/test_rule_008.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed.vhd"), lExpected) -class test_variable_assignment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable_assignment/test_rule_400.py b/tests/variable_assignment/test_rule_400.py index 25766ddba..8d8bcc32d 100644 --- a/tests/variable_assignment/test_rule_400.py +++ b/tests/variable_assignment/test_rule_400.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_400_test_input.fixed.vhd"), lExpected) -class test_variable_assignment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/variable_assignment/test_rule_401.py b/tests/variable_assignment/test_rule_401.py index 988a7c175..f0805449a 100644 --- a/tests/variable_assignment/test_rule_401.py +++ b/tests/variable_assignment/test_rule_401.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_401_test_input.fixed.vhd"), lExpected) -class test_variable_assignment_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/wait/test_rule_001.py b/tests/wait/test_rule_001.py index b5f34d35a..fa3325f68 100644 --- a/tests/wait/test_rule_001.py +++ b/tests/wait/test_rule_001.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_wait_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/wait/test_rule_300.py b/tests/wait/test_rule_300.py index bb98bc86b..8b90e33c0 100644 --- a/tests/wait/test_rule_300.py +++ b/tests/wait/test_rule_300.py @@ -18,7 +18,7 @@ utils.read_file(os.path.join(sTestDir, "rule_300_test_input.fixed.vhd"), lExpected) -class test_wait_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/wait/test_rule_500.py b/tests/wait/test_rule_500.py index 64a6bc952..a46d30553 100644 --- a/tests/wait/test_rule_500.py +++ b/tests/wait/test_rule_500.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_500_test_input.fixed_upper.vhd"), lExpected_upper) -class test_wait_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/wait/test_rule_501.py b/tests/wait/test_rule_501.py index d34dc60c3..f90f0d936 100644 --- a/tests/wait/test_rule_501.py +++ b/tests/wait/test_rule_501.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_501_test_input.fixed_upper.vhd"), lExpected_upper) -class test_wait_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/wait/test_rule_502.py b/tests/wait/test_rule_502.py index 44e147e87..29b39e124 100644 --- a/tests/wait/test_rule_502.py +++ b/tests/wait/test_rule_502.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_502_test_input.fixed_upper.vhd"), lExpected_upper) -class test_wait_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/wait/test_rule_503.py b/tests/wait/test_rule_503.py index 916cd8706..7cef6de75 100644 --- a/tests/wait/test_rule_503.py +++ b/tests/wait/test_rule_503.py @@ -20,7 +20,7 @@ utils.read_file(os.path.join(sTestDir, "rule_503_test_input.fixed_upper.vhd"), lExpected_upper) -class test_wait_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/when/test_rule_001.py b/tests/when/test_rule_001.py index c67ca0a9a..06d2df45f 100644 --- a/tests/when/test_rule_001.py +++ b/tests/when/test_rule_001.py @@ -16,7 +16,7 @@ utils.read_file(os.path.join(sTestDir, "rule_001_test_input.fixed.vhd"), lExpected) -class test_when_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/whitespace/test_rule_003.py b/tests/whitespace/test_rule_003.py index da8eaa0af..0c0c32ec6 100644 --- a/tests/whitespace/test_rule_003.py +++ b/tests/whitespace/test_rule_003.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_003_test_input.fixed.vhd"), lExpected) -class test_whitespace_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/whitespace/test_rule_004.py b/tests/whitespace/test_rule_004.py index ae1b448f2..3992651ea 100644 --- a/tests/whitespace/test_rule_004.py +++ b/tests/whitespace/test_rule_004.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_004_test_input.fixed.vhd"), lExpected) -class test_whitespace_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/whitespace/test_rule_005.py b/tests/whitespace/test_rule_005.py index dd2cc4dee..4ae3f4e72 100644 --- a/tests/whitespace/test_rule_005.py +++ b/tests/whitespace/test_rule_005.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_005_test_input.fixed.vhd"), lExpected) -class test_whitespace_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/whitespace/test_rule_006.py b/tests/whitespace/test_rule_006.py index 45cf393e3..6954b1eda 100644 --- a/tests/whitespace/test_rule_006.py +++ b/tests/whitespace/test_rule_006.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_006_test_input.fixed.vhd"), lExpected) -class test_whitespace_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/whitespace/test_rule_007.py b/tests/whitespace/test_rule_007.py index edaea29f2..76623612c 100644 --- a/tests/whitespace/test_rule_007.py +++ b/tests/whitespace/test_rule_007.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_007_test_input.fixed.vhd"), lExpected) -class test_whitespace_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/whitespace/test_rule_008.py b/tests/whitespace/test_rule_008.py index b55ce54c6..cf1611eac 100644 --- a/tests/whitespace/test_rule_008.py +++ b/tests/whitespace/test_rule_008.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_008_test_input.fixed.vhd"), lExpected) -class test_whitespace_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/whitespace/test_rule_010.py b/tests/whitespace/test_rule_010.py index a108d2a27..6a8f8b597 100644 --- a/tests/whitespace/test_rule_010.py +++ b/tests/whitespace/test_rule_010.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_010_test_input.fixed.vhd"), lExpected) -class test_whitespace_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/whitespace/test_rule_011.py b/tests/whitespace/test_rule_011.py index 16655cd1d..58e527d8b 100644 --- a/tests/whitespace/test_rule_011.py +++ b/tests/whitespace/test_rule_011.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_011_test_input.fixed.vhd"), lExpected) -class test_whitespace_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/whitespace/test_rule_013.py b/tests/whitespace/test_rule_013.py index 4a0c13df3..4400063e1 100644 --- a/tests/whitespace/test_rule_013.py +++ b/tests/whitespace/test_rule_013.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_013_test_input.fixed.vhd"), lExpected) -class test_whitespace_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) diff --git a/tests/whitespace/test_rule_101.py b/tests/whitespace/test_rule_101.py index 4f8f045fb..98f8a3715 100644 --- a/tests/whitespace/test_rule_101.py +++ b/tests/whitespace/test_rule_101.py @@ -15,7 +15,7 @@ utils.read_file(os.path.join(sTestDir, "rule_101_test_input.fixed.vhd"), lExpected) -class test_whitespace_rule(unittest.TestCase): +class test_rule(unittest.TestCase): def setUp(self): self.oFile = vhdlFile.vhdlFile(lFile) self.assertIsNone(eError) From f4845d0b4453086130c6a447366e7a4b7358554f Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 8 Mar 2025 09:39:12 -0600 Subject: [PATCH 036/124] Removing decorators from comments, pragmas, preprocessor and whitespace. --- vsg/vhdlFile/classify/comment.py | 7 ------- vsg/vhdlFile/classify/pragma.py | 14 -------------- vsg/vhdlFile/classify/preprocessor.py | 2 -- vsg/vhdlFile/classify/whitespace.py | 6 ------ 4 files changed, 29 deletions(-) diff --git a/vsg/vhdlFile/classify/comment.py b/vsg/vhdlFile/classify/comment.py index eb272d10f..38320f823 100644 --- a/vsg/vhdlFile/classify/comment.py +++ b/vsg/vhdlFile/classify/comment.py @@ -2,10 +2,8 @@ from vsg import parser from vsg.token import delimited_comment as token -from vsg import decorators -@decorators.print_classifier_debug_info(__name__) def classify(lTokens, lObjects, oOptions): if len(lObjects) == 0 and oOptions.inside_delimited_comment(): lObjects.append(token.text("")) @@ -20,7 +18,6 @@ def classify(lTokens, lObjects, oOptions): merge_text_tokens(lObjects) -@decorators.print_classifier_debug_info(__name__) def classify_closing_comment_delimiters(iToken, lObjects, oOptions): sToken = lObjects[iToken].get_value() if oOptions.inside_delimited_comment() and sToken == "*/": @@ -28,12 +25,10 @@ def classify_closing_comment_delimiters(iToken, lObjects, oOptions): oOptions.clear_inside_delimited_comment() -@decorators.print_classifier_debug_info(__name__) def classify_opening_comment_delimiters(iToken, lObjects, oOptions): classify_delimited_comment_open_keyword(iToken, lObjects, oOptions) -@decorators.print_classifier_debug_info(__name__) def classify_single_line_comment(iToken, lObjects, oOptions): sToken = lObjects[iToken].get_value() if not oOptions.inside_delimited_comment() and sToken.startswith("--"): @@ -58,7 +53,6 @@ def classify_single_line_comment(iToken, lObjects, oOptions): return False -@decorators.print_classifier_debug_info(__name__) def classify_delimited_comment_open_keyword(iToken, lObjects, oOptions): sToken = lObjects[iToken].get_value() if not oOptions.inside_delimited_comment() and sToken == "/*": @@ -66,7 +60,6 @@ def classify_delimited_comment_open_keyword(iToken, lObjects, oOptions): oOptions.set_inside_delimited_comment() -@decorators.print_classifier_debug_info(__name__) def classify_delimited_comment_text(iToken, lObjects, oOptions): sToken = lObjects[iToken].get_value() if oOptions.inside_delimited_comment(): diff --git a/vsg/vhdlFile/classify/pragma.py b/vsg/vhdlFile/classify/pragma.py index 4f9c7b7b2..432bee216 100644 --- a/vsg/vhdlFile/classify/pragma.py +++ b/vsg/vhdlFile/classify/pragma.py @@ -2,10 +2,8 @@ from vsg import parser from vsg.token import pragma -from vsg import decorators -@decorators.print_classifier_debug_info(__name__) def classify(lObjects, lOpenPragmas, lClosePragmas, dVars, configuration): """ Classifies pragmas @@ -19,7 +17,6 @@ def classify(lObjects, lOpenPragmas, lClosePragmas, dVars, configuration): set_tokens_to_ignore(lObjects, lClosePragmas, dVars) -@decorators.print_classifier_debug_info(__name__) def set_tokens_to_ignore(lObjects, lClosePragmas, dVars): for iToken, oToken in enumerate(lObjects): if not isinstance(oToken, parser.whitespace): @@ -28,17 +25,14 @@ def set_tokens_to_ignore(lObjects, lClosePragmas, dVars): dVars["pragma"] = False -@decorators.print_classifier_debug_info(__name__) def inside_vhdloff_vhdlon_region(dVars): return dVars["pragma"] -@decorators.print_classifier_debug_info(__name__) def line_starts_with_comment(lObjects): return first_token_is_a_comment(lObjects) or second_token_is_a_comment(lObjects) -@decorators.print_classifier_debug_info(__name__) def check_for_open_pragmas(lObjects, dVars, lOpenPragmas): for oToken in lObjects: sToken = oToken.get_value() @@ -46,7 +40,6 @@ def check_for_open_pragmas(lObjects, dVars, lOpenPragmas): dVars["pragma"] = True -@decorators.print_classifier_debug_info(__name__) def first_token_is_a_comment(lObjects): try: return token_is_a_comment(lObjects[0]) @@ -54,7 +47,6 @@ def first_token_is_a_comment(lObjects): return False -@decorators.print_classifier_debug_info(__name__) def second_token_is_a_comment(lObjects): try: return token_is_a_comment(lObjects[1]) @@ -62,14 +54,12 @@ def second_token_is_a_comment(lObjects): return False -@decorators.print_classifier_debug_info(__name__) def token_is_a_comment(oToken): if oToken.get_value().startswith("--"): return True return False -@decorators.print_classifier_debug_info(__name__) def classify_pragmas(lObjects, dVars, configuration): if classify_open_pragmas(lObjects, dVars, configuration): return True @@ -80,7 +70,6 @@ def classify_pragmas(lObjects, dVars, configuration): return False -@decorators.print_classifier_debug_info(__name__) def classify_open_pragmas(lObjects, dVars, configuration): for regex in configuration.dConfig["pragma"]["regexp"]["open"]: if regex.match(dVars["line"]): @@ -91,7 +80,6 @@ def classify_open_pragmas(lObjects, dVars, configuration): return False -@decorators.print_classifier_debug_info(__name__) def classify_close_pragmas(lObjects, dVars, configuration): for regex in configuration.dConfig["pragma"]["regexp"]["close"]: if regex.match(dVars["line"]): @@ -102,7 +90,6 @@ def classify_close_pragmas(lObjects, dVars, configuration): return False -@decorators.print_classifier_debug_info(__name__) def classify_single_pragmas(lObjects, dVars, configuration): for regex in configuration.dConfig["pragma"]["regexp"]["single"]: if classify_pragma(lObjects, dVars, regex, pragma.single): @@ -110,7 +97,6 @@ def classify_single_pragmas(lObjects, dVars, configuration): return False -@decorators.print_classifier_debug_info(__name__) def classify_pragma(lObjects, dVars, regex, oType): if regex.match(dVars["line"]): for iToken, oToken in enumerate(lObjects): diff --git a/vsg/vhdlFile/classify/preprocessor.py b/vsg/vhdlFile/classify/preprocessor.py index 10c3fad5c..d9070f42f 100644 --- a/vsg/vhdlFile/classify/preprocessor.py +++ b/vsg/vhdlFile/classify/preprocessor.py @@ -2,10 +2,8 @@ from vsg import parser -from vsg import decorators -@decorators.print_classifier_debug_info(__name__) def classify(lTokens, lObjects): """ Classifies preprocessor commands diff --git a/vsg/vhdlFile/classify/whitespace.py b/vsg/vhdlFile/classify/whitespace.py index ba2f63200..f8b3c4afd 100644 --- a/vsg/vhdlFile/classify/whitespace.py +++ b/vsg/vhdlFile/classify/whitespace.py @@ -2,10 +2,8 @@ from vsg import parser -from vsg import decorators -@decorators.print_classifier_debug_info(__name__) def classify(lTokens, lObjects): """ Classifies whitespace objects. @@ -25,28 +23,24 @@ def classify(lTokens, lObjects): lObjects[iToken].has_tab = True -@decorators.print_classifier_debug_info(__name__) def string_contains_space(sToken): if " " in sToken: return True return False -@decorators.print_classifier_debug_info(__name__) def string_contains_tab(sToken): if "\t" in sToken: return True return False -@decorators.print_classifier_debug_info(__name__) def is_string_literal(sToken): if sToken[0] == '"' and sToken[-1] == '"': return True return False -@decorators.print_classifier_debug_info(__name__) def is_character_literal(sToken): if sToken[0] == "'" and sToken[-1] == "'": return True From eb4b2279804ce050e5d9b094881e050ae828e884 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 16 Mar 2025 21:19:10 -0500 Subject: [PATCH 037/124] Updating classifiers to pass entity tests. --- vsg/data_structure.py | 2 +- vsg/decorators.py | 2 +- vsg/vhdlFile/classify/entity_header.py | 12 +++- vsg/vhdlFile/classify/entity_statement.py | 22 +++---- .../classify/entity_statement_part.py | 7 +- vsg/vhdlFile/classify/generic_clause.py | 5 +- vsg/vhdlFile/classify/generic_list.py | 4 +- .../interface_constant_declaration.py | 6 +- .../classify/interface_declaration.py | 49 ++++++++------ vsg/vhdlFile/classify/interface_element.py | 4 +- .../classify/interface_file_declaration.py | 6 +- .../interface_function_specification.py | 10 +-- .../interface_incomplete_type_declaration.py | 6 +- vsg/vhdlFile/classify/interface_list.py | 12 ++-- .../classify/interface_object_declaration.py | 64 ++++++++++++------- .../classify/interface_package_declaration.py | 6 +- .../interface_procedure_specification.py | 6 +- .../classify/interface_signal_declaration.py | 6 +- .../interface_subprogram_declaration.py | 23 ++++--- .../interface_subprogram_specification.py | 16 ++--- .../classify/interface_type_declaration.py | 7 +- .../classify/interface_unknown_declaration.py | 27 ++++---- .../interface_variable_declaration.py | 6 +- vsg/vhdlFile/classify/mode.py | 14 ++-- vsg/vhdlFile/classify/package_header.py | 3 +- vsg/vhdlFile/classify/port_clause.py | 5 +- vsg/vhdlFile/classify/port_list.py | 4 +- vsg/vhdlFile/classify/utils.py | 27 +++++++- 28 files changed, 200 insertions(+), 161 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 7efad5134..4d00ad6b3 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from vsg import parser -from vsg.vhdlFile import utils +from vsg.vhdlFile.classify import utils def New(lAllObjects): diff --git a/vsg/decorators.py b/vsg/decorators.py index 949911a40..3943fe1d6 100644 --- a/vsg/decorators.py +++ b/vsg/decorators.py @@ -11,7 +11,7 @@ def wrapper(*args, **kwargs): return wrapper level = 0 -display = True +display = False def print_classifier_debug_info(argument): print_classifier_debug_info.level = 0 diff --git a/vsg/vhdlFile/classify/entity_header.py b/vsg/vhdlFile/classify/entity_header.py index f2565acfe..134f55808 100644 --- a/vsg/vhdlFile/classify/entity_header.py +++ b/vsg/vhdlFile/classify/entity_header.py @@ -13,6 +13,14 @@ def detect(oDataStructure): [ *formal*_port_clause ] """ - generic_clause.detect(oDataStructure) + bGeneric = False + if generic_clause.detect(oDataStructure): + generic_clause.classify(oDataStructure) + bGeneric = True - port_clause.detect(oDataStructure) + bPort = False + if port_clause.detect(oDataStructure): + port_clause.classify(oDataStructure) + bPort = True + + return bGeneric or bPort diff --git a/vsg/vhdlFile/classify/entity_statement.py b/vsg/vhdlFile/classify/entity_statement.py index 447cf5f88..66e86db75 100644 --- a/vsg/vhdlFile/classify/entity_statement.py +++ b/vsg/vhdlFile/classify/entity_statement.py @@ -9,7 +9,7 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ entity_statement ::= concurrent_assertion_statement @@ -18,16 +18,16 @@ def detect(iToken, lObjects): | *PSL*_PSL_Directive """ - iCurrent = process_statement.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if process_statement.detect(oDataStructure): + process_statement.classify(oDataStructure) + return True - iCurrent = concurrent_assertion_statement.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if concurrent_assertion_statement.detect(oDataStructure): + concurrent_assertion_statement.classify(oDataStructure) + return True - iCurrent = concurrent_procedure_call_statement.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if concurrent_procedure_call_statement.detect(oDataStructure): + concurrent_procedure_call_statement.classify(oDataStructure) + return True - return iToken + return False diff --git a/vsg/vhdlFile/classify/entity_statement_part.py b/vsg/vhdlFile/classify/entity_statement_part.py index e1c9c221d..8071c522d 100644 --- a/vsg/vhdlFile/classify/entity_statement_part.py +++ b/vsg/vhdlFile/classify/entity_statement_part.py @@ -6,10 +6,13 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ entity_statement_part ::= { entity_statement } """ - return utils.detect_submodule(iToken, lObjects, entity_statement) + while entity_statement.detect(oDataStructure): + pass + + return False diff --git a/vsg/vhdlFile/classify/generic_clause.py b/vsg/vhdlFile/classify/generic_clause.py index a3f862178..aaf0b337e 100644 --- a/vsg/vhdlFile/classify/generic_clause.py +++ b/vsg/vhdlFile/classify/generic_clause.py @@ -11,10 +11,7 @@ def detect(oDataStructure): generic_clause ::= generic ( generic_list ) ; """ - if oDataStructure.are_next_consecutive_tokens(["generic", "("]): - classify(iToken, lObjects) - return True - return False + return oDataStructure.are_next_consecutive_tokens(["generic", "("]) @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/generic_list.py b/vsg/vhdlFile/classify/generic_list.py index 9b05457ed..0446204a1 100644 --- a/vsg/vhdlFile/classify/generic_list.py +++ b/vsg/vhdlFile/classify/generic_list.py @@ -5,10 +5,10 @@ @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ generic_list ::= *generic*_interface_list """ - return interface_list.classify(iToken, lObjects) + interface_list.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/interface_constant_declaration.py b/vsg/vhdlFile/classify/interface_constant_declaration.py index aadf75c70..b96e7f50c 100644 --- a/vsg/vhdlFile/classify/interface_constant_declaration.py +++ b/vsg/vhdlFile/classify/interface_constant_declaration.py @@ -7,15 +7,13 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ interface_constant_declaration ::= [ constant ] identifier_list : [ in ] subtype_indication [ := static_expression ] """ - if utils.is_next_token("constant", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + return oDataStructure.is_next_token("constant") @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_declaration.py b/vsg/vhdlFile/classify/interface_declaration.py index 6cb4334f6..f5cf3cc54 100644 --- a/vsg/vhdlFile/classify/interface_declaration.py +++ b/vsg/vhdlFile/classify/interface_declaration.py @@ -10,7 +10,7 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ interface_declaration ::= interface_object_declaration @@ -19,20 +19,33 @@ def detect(iToken, lObjects): | interface_package_declaration """ - iCurrent = interface_object_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent - - iCurrent = interface_type_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent - - iCurrent = interface_subprogram_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent - - iCurrent = interface_package_declaration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent - - return iToken + if interface_object_declaration.detect(oDataStructure): + return interface_object_declaration.classify(oDataStructure) + + if interface_type_declaration.detect(oDataStructure): + return interface_type_declaration.classify(oDataStructure) + + if interface_subprogram_declaration.detect(oDataStructure): + return interface_subprogram_declaration.classify(oDataStructure) + + if interface_package_declaration.detect(oDataStructure): + return interface_package_declaration.classify(oDataStructure) + + return False +# iCurrent = interface_object_declaration.detect(iToken, lObjects) +# if iCurrent != iToken: +# return iCurrent +# +# iCurrent = interface_type_declaration.detect(iToken, lObjects) +# if iCurrent != iToken: +# return iCurrent +# +# iCurrent = interface_subprogram_declaration.detect(iToken, lObjects) +# if iCurrent != iToken: +# return iCurrent +# +# iCurrent = interface_package_declaration.detect(iToken, lObjects) +# if iCurrent != iToken: +# return iCurrent +# +# return iToken diff --git a/vsg/vhdlFile/classify/interface_element.py b/vsg/vhdlFile/classify/interface_element.py index 0493c1223..234475ba2 100644 --- a/vsg/vhdlFile/classify/interface_element.py +++ b/vsg/vhdlFile/classify/interface_element.py @@ -5,10 +5,10 @@ @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ interface_element ::= interface_declaration """ - return interface_declaration.detect(iToken, lObjects) + interface_declaration.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/interface_file_declaration.py b/vsg/vhdlFile/classify/interface_file_declaration.py index 8158ea630..aee0cfedf 100644 --- a/vsg/vhdlFile/classify/interface_file_declaration.py +++ b/vsg/vhdlFile/classify/interface_file_declaration.py @@ -7,15 +7,13 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ interface_file_declaration ::= file identifier_list : subtype_indication """ - if utils.is_next_token("file", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + return oDataStructure.is_next_token("file") @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_function_specification.py b/vsg/vhdlFile/classify/interface_function_specification.py index e101532d7..82d2fdf19 100644 --- a/vsg/vhdlFile/classify/interface_function_specification.py +++ b/vsg/vhdlFile/classify/interface_function_specification.py @@ -7,20 +7,14 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ interface_function_specification ::= [ pure | impure ] function designator [ [ parameter ] ( formal_parameter_list ) ] return type_mark """ - if utils.is_next_token("pure", iToken, lObjects): - return classify(iToken, lObjects) - elif utils.is_next_token("impure", iToken, lObjects): - return classify(iToken, lObjects) - elif utils.is_next_token("function", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + return oDataStructure.is_next_token_one_of(["pure", "impure", "function"]) @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py b/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py index 83ad2cd57..fb1594fe9 100644 --- a/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py +++ b/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py @@ -7,14 +7,12 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ interface_incomplete_type_declaration ::= type identifier """ - if utils.is_next_token("type", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + return oDataStructure.is_next_token("type") @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_list.py b/vsg/vhdlFile/classify/interface_list.py index d7e63cc65..7bfc18907 100644 --- a/vsg/vhdlFile/classify/interface_list.py +++ b/vsg/vhdlFile/classify/interface_list.py @@ -7,16 +7,14 @@ @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ interface_list ::= interface_element { ; interface_element } """ - iCurrent = interface_element.classify(iToken, lObjects) + interface_element.classify(oDataStructure) - while utils.is_next_token(";", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - iCurrent = interface_element.classify(iCurrent, lObjects) - - return iCurrent + while oDataStructure.is_next_token(";"): + oDataStructure.replace_next_token_with(token.semicolon) + interface_element.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/interface_object_declaration.py b/vsg/vhdlFile/classify/interface_object_declaration.py index f83378099..6cb1348a4 100644 --- a/vsg/vhdlFile/classify/interface_object_declaration.py +++ b/vsg/vhdlFile/classify/interface_object_declaration.py @@ -11,7 +11,7 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iCurrent, lObjects): +def detect(oDataStructure): """ interface_object_declaration ::= interface_constant_declaration @@ -20,26 +20,42 @@ def detect(iCurrent, lObjects): | interface_file_declaration """ - iReturn = interface_constant_declaration.detect(iCurrent, lObjects) - if iReturn != iCurrent: - return iReturn - - iReturn = interface_signal_declaration.detect(iCurrent, lObjects) - if iReturn != iCurrent: - return iReturn - - iReturn = interface_variable_declaration.detect(iCurrent, lObjects) - if iReturn != iCurrent: - return iReturn - - iReturn = interface_file_declaration.detect(iCurrent, lObjects) - if iReturn != iCurrent: - return iReturn - - ### This captures constant, signal and variable declarations without optional keywords - ### This is typically done in port lists - iReturn = interface_unknown_declaration.detect(iCurrent, lObjects) - if iReturn != iCurrent: - return iReturn - - return iCurrent + if interface_constant_declaration.detect(oDataStructure): + return interface_constant_declaration.classify(oDataStructure) + + if interface_signal_declaration.detect(oDataStructure): + return interface_signal_declaration.classify(oDataStructure) + + if interface_variable_declaration.detect(oDataStructure): + return interface_variable_declaration.classify(oDataStructure) + + if interface_file_declaration.detect(oDataStructure): + return interface_file_declaration.classify(oDataStructure) + + if interface_unknown_declaration.detect(oDataStructure): + return interface_unknown_declaration.classify(oDataStructure) + + return False +# iReturn = interface_constant_declaration.detect(iCurrent, lObjects) +# if iReturn != iCurrent: +# return iReturn +# +# iReturn = interface_signal_declaration.detect(iCurrent, lObjects) +# if iReturn != iCurrent: +# return iReturn +# +# iReturn = interface_variable_declaration.detect(iCurrent, lObjects) +# if iReturn != iCurrent: +# return iReturn +# +# iReturn = interface_file_declaration.detect(iCurrent, lObjects) +# if iReturn != iCurrent: +# return iReturn +# +# ### This captures constant, signal and variable declarations without optional keywords +# ### This is typically done in port lists +# iReturn = interface_unknown_declaration.detect(iCurrent, lObjects) +# if iReturn != iCurrent: +# return iReturn +# +# return iCurrent diff --git a/vsg/vhdlFile/classify/interface_package_declaration.py b/vsg/vhdlFile/classify/interface_package_declaration.py index 47375f557..9f3a76ce6 100644 --- a/vsg/vhdlFile/classify/interface_package_declaration.py +++ b/vsg/vhdlFile/classify/interface_package_declaration.py @@ -7,15 +7,13 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ interface_package_declaration ::= package identifier is new *uninstantiated_package*_name interface_package_generic_map_aspect """ - if utils.is_next_token("package", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + return oDataStructure.is_next_token("package") @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_procedure_specification.py b/vsg/vhdlFile/classify/interface_procedure_specification.py index 46acf3f2b..392144487 100644 --- a/vsg/vhdlFile/classify/interface_procedure_specification.py +++ b/vsg/vhdlFile/classify/interface_procedure_specification.py @@ -7,15 +7,13 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ interface_procedure_specification ::= procedure designator [ [ parameter ] ( formal_parameter_list ) ] """ - if utils.is_next_token("procedure", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + return oDataStructure.is_next_token("procedure") @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_signal_declaration.py b/vsg/vhdlFile/classify/interface_signal_declaration.py index cd4308f90..47f0f8735 100644 --- a/vsg/vhdlFile/classify/interface_signal_declaration.py +++ b/vsg/vhdlFile/classify/interface_signal_declaration.py @@ -8,15 +8,13 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ interface_signal_declaration ::= [ signal ] identifier_list : [ mode ] subtype_indication [ bus ] [ := *static*_expression ] """ - if utils.is_next_token("signal", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + return oDataStructure.is_next_token("signal") @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_subprogram_declaration.py b/vsg/vhdlFile/classify/interface_subprogram_declaration.py index bbbe92328..26c604fb9 100644 --- a/vsg/vhdlFile/classify/interface_subprogram_declaration.py +++ b/vsg/vhdlFile/classify/interface_subprogram_declaration.py @@ -10,19 +10,24 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ interface_subprogram_declaration ::= interface_subprogram_specification [ is interface_subprogram_default ] """ - iCurrent = utils.find_next_token(iToken, lObjects) - iLast = iCurrent - iCurrent = interface_subprogram_specification.detect(iCurrent, lObjects) - if iLast != iCurrent: - iCurrent = utils.find_next_token(iToken, lObjects) - if utils.object_value_is(lObjects, iCurrent, "is"): - return classify(iCurrent, lObjects) - return iToken +# iCurrent = utils.find_next_token(iToken, lObjects) +# iLast = iCurrent +# iCurrent = interface_subprogram_specification.detect(iCurrent, lObjects) +# if iLast != iCurrent: +# iCurrent = utils.find_next_token(iToken, lObjects) +# if utils.object_value_is(lObjects, iCurrent, "is"): +# return classify(iCurrent, lObjects) +# return iToken + + if interface_subprogram_specification.detect(oDataStructure): + oDataStructure.increment_seek_index() + return oDataStructure.is_next_seek_token("is") + return False @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_subprogram_specification.py b/vsg/vhdlFile/classify/interface_subprogram_specification.py index 6322d5b35..4389cb39b 100644 --- a/vsg/vhdlFile/classify/interface_subprogram_specification.py +++ b/vsg/vhdlFile/classify/interface_subprogram_specification.py @@ -8,19 +8,19 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ interface_subprogram_specification ::= interface_procedure_specification | interface_function_specification """ - iCurrent = interface_procedure_specification.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if interface_procedure_specification.detect(oDataStructure): + interface_procedure_specification.classify(oDataStructure) + return True - iCurrent = interface_function_specification.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if interface_function_specification.detect(oDataStructure): + interface_function_specification.classify(oDataStructure) + return True - return iToken + return False diff --git a/vsg/vhdlFile/classify/interface_type_declaration.py b/vsg/vhdlFile/classify/interface_type_declaration.py index 3d44b2d77..e9dc0760c 100644 --- a/vsg/vhdlFile/classify/interface_type_declaration.py +++ b/vsg/vhdlFile/classify/interface_type_declaration.py @@ -5,10 +5,13 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ interface_type_declaration ::= interface_incomplete_type_declaration """ - return interface_incomplete_type_declaration.detect(iToken, lObjects) + if interface_incomplete_type_declaration.detect(oDataStructure): + return interface_incomplete_type_declaration.classify(oDataStructure) + + return False diff --git a/vsg/vhdlFile/classify/interface_unknown_declaration.py b/vsg/vhdlFile/classify/interface_unknown_declaration.py index bb6e293ee..611fff9ca 100644 --- a/vsg/vhdlFile/classify/interface_unknown_declaration.py +++ b/vsg/vhdlFile/classify/interface_unknown_declaration.py @@ -7,7 +7,7 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ This is a classification if the signal, constant, or variable keywords can not be found. This is not in the VHDL LRM. @@ -17,27 +17,22 @@ def detect(iToken, lObjects): identifier_list : [ mode ] subtype_indication [ bus ] [ := *static*_expression ] """ - if utils.is_next_token_one_of(["type", "file", "function", "procedure", "impure", "pure", "package"], iToken, lObjects): - return iToken - else: - return classify(iToken, lObjects) + return not oDataStructure.is_next_token_one_of(["type", "file", "function", "procedure", "impure", "pure", "package"]) @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = identifier_list.classify_until([":"], iToken, lObjects, token.identifier) +def classify(oDataStructure): + identifier_list.classify_until([":"], oDataStructure, token.identifier) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) + oDataStructure.replace_next_token_required(":", token.colon) - iCurrent = mode.classify(iCurrent, lObjects) + mode.classify(oDataStructure) - iCurrent = subtype_indication.classify(iCurrent, lObjects) + subtype_indication.classify(oDataStructure) - iCurrent = utils.assign_next_token_if("bus", token.bus_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_with_if("bus", token.bus_keyword) - if utils.is_next_token(":=", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(":=", token.assignment, iCurrent, lObjects) + if oDataStructure.is_next_token(":="): + oDataStructure.replace_next_token_required(":=", token.assignment) - iCurrent = expression.classify_until([";"], iCurrent, lObjects) - - return iCurrent + expression.classify_until([";"], oDataStructure) diff --git a/vsg/vhdlFile/classify/interface_variable_declaration.py b/vsg/vhdlFile/classify/interface_variable_declaration.py index c418e1ebf..19bb38a2c 100644 --- a/vsg/vhdlFile/classify/interface_variable_declaration.py +++ b/vsg/vhdlFile/classify/interface_variable_declaration.py @@ -7,15 +7,13 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ interface_variable_declaration ::= [ variable ] identifier_list : [ mode ] subtype_indication [ := static_expression ] """ - if utils.is_next_token("variable", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + return oDataStructure.is_next_token("variable") @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/mode.py b/vsg/vhdlFile/classify/mode.py index 52f5293f0..3135a7a9f 100644 --- a/vsg/vhdlFile/classify/mode.py +++ b/vsg/vhdlFile/classify/mode.py @@ -6,16 +6,14 @@ @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ mode ::= in | out | inout | buffer | linkage """ - iCurrent = utils.assign_next_token_if("in", token.in_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("out", token.out_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if("inout", token.inout_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if("buffer", token.buffer_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if("linkage", token.linkage_keyword, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_with_if("in", token.in_keyword) + oDataStructure.replace_next_token_with_if("out", token.out_keyword) + oDataStructure.replace_next_token_with_if("inout", token.inout_keyword) + oDataStructure.replace_next_token_with_if("buffer", token.buffer_keyword) + oDataStructure.replace_next_token_with_if("linkage", token.linkage_keyword) diff --git a/vsg/vhdlFile/classify/package_header.py b/vsg/vhdlFile/classify/package_header.py index e057a4ef2..8e0dbf225 100644 --- a/vsg/vhdlFile/classify/package_header.py +++ b/vsg/vhdlFile/classify/package_header.py @@ -14,7 +14,8 @@ def detect(oDataStructure): """ if generic_clause.detect(oDataStructure): + generic_clause.classify(oDataStructure) if generic_map_aspect.detect(oDataStructure): oDataStructure.assign_next_token_required(";", token.semicolon) - return True + return True return False diff --git a/vsg/vhdlFile/classify/port_clause.py b/vsg/vhdlFile/classify/port_clause.py index 54fc2336f..bf68b53ed 100644 --- a/vsg/vhdlFile/classify/port_clause.py +++ b/vsg/vhdlFile/classify/port_clause.py @@ -13,10 +13,7 @@ def detect(oDataStructure): port ( port_list ) ; """ - if oDataStructure.are_next_consecutive_tokens(["port", "("]): - classify(oDataStructure) - return True - return False + return oDataStructure.are_next_consecutive_tokens(["port", "("]) @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/port_list.py b/vsg/vhdlFile/classify/port_list.py index e773e0eb0..7f52c9fa3 100644 --- a/vsg/vhdlFile/classify/port_list.py +++ b/vsg/vhdlFile/classify/port_list.py @@ -5,10 +5,10 @@ @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ port_list ::= *port*_interface_list """ - return interface_list.classify(iToken, lObjects) + interface_list.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 23eb77eff..280ade296 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from vsg import parser +from vsg import exceptions, parser from vsg.token import choice, direction, element_association, exponent from vsg.vhdlFile import utils @@ -213,3 +213,28 @@ def assign_tokens_until(sToken, token, oDataStructure): def tokenize_postponed(oDataStructure, token): oDataStructure.replace_next_token_with_if("postponed", token) + + +def print_error_message(sToken, token, oDataStructure): + sFoundToken = oDataStructure.get_current_token_value() + iLine = 0 + iColumn = 0 +# iLine = calculate_line_number(iToken, lObjects) +# iColumn = calculate_column(iToken, lObjects) + sModuleName = extract_module_name(token) + sFileName = oDataStructure.sFilename + + sErrorMessage = "\n" + sErrorMessage += f"Error: Unexpected token detected while parsing {sModuleName} @ Line {iLine}, Column {iColumn} in file {sFileName}" + sErrorMessage += "\n" + sErrorMessage += f" Expecting : {sToken}" + sErrorMessage += "\n" + sErrorMessage += f" Found : {sFoundToken}" + sErrorMessage += "\n" + + raise exceptions.ClassifyError(sErrorMessage) + + +def extract_module_name(token): + return token.__module__.split(".")[-1] + From 867733843eb5a19c4b1a71adb9064c6e5417cd0b Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 16 Mar 2025 21:21:14 -0500 Subject: [PATCH 038/124] Running style updates. --- vsg/decorators.py | 17 ++++++++++++----- .../classify/access_type_definition.py | 2 +- vsg/vhdlFile/classify/actual_parameter_part.py | 2 +- vsg/vhdlFile/classify/alias_declaration.py | 2 +- vsg/vhdlFile/classify/architecture_body.py | 2 +- .../classify/architecture_declarative_part.py | 2 +- .../classify/architecture_statement_part.py | 2 +- vsg/vhdlFile/classify/array_constraint.py | 2 +- .../classify/array_element_constraint.py | 2 +- vsg/vhdlFile/classify/array_type_definition.py | 2 +- vsg/vhdlFile/classify/assertion.py | 2 +- vsg/vhdlFile/classify/assertion_statement.py | 2 +- vsg/vhdlFile/classify/association_element.py | 2 +- vsg/vhdlFile/classify/association_list.py | 2 +- vsg/vhdlFile/classify/attribute_declaration.py | 2 +- vsg/vhdlFile/classify/attribute_name.py | 3 +-- .../classify/attribute_specification.py | 2 +- vsg/vhdlFile/classify/binding_indication.py | 2 +- vsg/vhdlFile/classify/bit_string_literal.py | 2 +- vsg/vhdlFile/classify/block_configuration.py | 2 +- .../classify/block_declarative_item.py | 2 +- .../classify/block_declarative_part.py | 2 +- vsg/vhdlFile/classify/block_header.py | 2 +- vsg/vhdlFile/classify/block_specification.py | 2 +- vsg/vhdlFile/classify/block_statement.py | 2 +- vsg/vhdlFile/classify/block_statement_part.py | 2 +- .../classify/case_generate_alternative.py | 2 +- .../classify/case_generate_statement.py | 2 +- vsg/vhdlFile/classify/case_statement.py | 2 +- .../classify/case_statement_alternative.py | 2 +- vsg/vhdlFile/classify/character_literal.py | 3 +-- vsg/vhdlFile/classify/choice.py | 3 +-- vsg/vhdlFile/classify/choices.py | 2 +- .../classify/component_configuration.py | 2 +- vsg/vhdlFile/classify/component_declaration.py | 2 +- .../component_instantiation_statement.py | 2 +- .../classify/component_specification.py | 2 +- .../classify/composite_type_definition.py | 2 +- .../classify/concurrent_assertion_statement.py | 2 +- ...concurrent_conditional_signal_assignment.py | 2 +- .../concurrent_procedure_call_statement.py | 2 +- .../concurrent_selected_signal_assignment.py | 2 +- .../concurrent_signal_assignment_statement.py | 2 +- .../concurrent_simple_signal_assignment.py | 2 +- vsg/vhdlFile/classify/concurrent_statement.py | 2 +- vsg/vhdlFile/classify/condition.py | 2 +- vsg/vhdlFile/classify/condition_clause.py | 2 +- .../classify/conditional_expressions.py | 2 +- .../classify/conditional_force_assignment.py | 2 +- .../classify/conditional_signal_assignment.py | 2 +- .../conditional_variable_assignment.py | 2 +- .../conditional_waveform_assignment.py | 2 +- vsg/vhdlFile/classify/conditional_waveforms.py | 2 +- .../classify/configuration_declaration.py | 2 +- .../classify/configuration_declarative_item.py | 2 +- .../classify/configuration_declarative_part.py | 2 +- vsg/vhdlFile/classify/configuration_item.py | 2 +- .../classify/configuration_specification.py | 2 +- vsg/vhdlFile/classify/constant_declaration.py | 2 +- .../classify/constrained_array_definition.py | 2 +- vsg/vhdlFile/classify/constraint.py | 2 +- vsg/vhdlFile/classify/context_clause.py | 2 +- vsg/vhdlFile/classify/context_declaration.py | 2 +- vsg/vhdlFile/classify/context_item.py | 2 +- vsg/vhdlFile/classify/context_reference.py | 2 +- vsg/vhdlFile/classify/delay_mechanism.py | 2 +- vsg/vhdlFile/classify/design_file.py | 2 +- vsg/vhdlFile/classify/design_unit.py | 2 +- vsg/vhdlFile/classify/discrete_range.py | 3 +-- vsg/vhdlFile/classify/element_constraint.py | 2 +- vsg/vhdlFile/classify/element_declaration.py | 2 +- vsg/vhdlFile/classify/element_resolution.py | 2 +- .../classify/element_subtype_definition.py | 2 +- vsg/vhdlFile/classify/entity_aspect.py | 2 +- vsg/vhdlFile/classify/entity_declaration.py | 2 +- .../classify/entity_declarative_item.py | 2 +- .../classify/entity_declarative_part.py | 2 +- vsg/vhdlFile/classify/entity_designator.py | 2 +- vsg/vhdlFile/classify/entity_header.py | 2 +- vsg/vhdlFile/classify/entity_name_list.py | 2 +- vsg/vhdlFile/classify/entity_specification.py | 2 +- vsg/vhdlFile/classify/entity_statement.py | 2 +- vsg/vhdlFile/classify/entity_statement_part.py | 2 +- .../classify/enumeration_type_definition.py | 2 +- vsg/vhdlFile/classify/exit_statement.py | 2 +- vsg/vhdlFile/classify/expression.py | 3 +-- .../classify/external_constant_name.py | 2 +- vsg/vhdlFile/classify/external_name.py | 2 +- vsg/vhdlFile/classify/external_signal_name.py | 2 +- .../classify/external_variable_name.py | 2 +- vsg/vhdlFile/classify/file_declaration.py | 2 +- vsg/vhdlFile/classify/file_logical_name.py | 2 +- vsg/vhdlFile/classify/file_open_information.py | 2 +- vsg/vhdlFile/classify/file_type_definition.py | 2 +- .../classify/for_generate_statement.py | 2 +- vsg/vhdlFile/classify/force_mode.py | 2 +- vsg/vhdlFile/classify/formal_parameter_list.py | 2 +- vsg/vhdlFile/classify/formal_part.py | 3 +-- vsg/vhdlFile/classify/full_type_declaration.py | 2 +- .../classify/function_specification.py | 2 +- .../classify/generate_specification.py | 2 +- vsg/vhdlFile/classify/generate_statement.py | 2 +- .../classify/generate_statement_body.py | 2 +- vsg/vhdlFile/classify/generic_clause.py | 2 +- vsg/vhdlFile/classify/generic_list.py | 2 +- vsg/vhdlFile/classify/generic_map_aspect.py | 2 +- .../classify/group_constituent_list.py | 2 +- vsg/vhdlFile/classify/group_declaration.py | 2 +- vsg/vhdlFile/classify/identifier.py | 2 +- vsg/vhdlFile/classify/identifier_list.py | 2 +- vsg/vhdlFile/classify/if_generate_statement.py | 2 +- vsg/vhdlFile/classify/if_statement.py | 2 +- .../classify/incomplete_type_declaration.py | 2 +- vsg/vhdlFile/classify/index_constraint.py | 2 +- .../classify/index_subtype_definition.py | 2 +- vsg/vhdlFile/classify/instantiated_unit.py | 2 +- vsg/vhdlFile/classify/instantiation_list.py | 2 +- .../classify/integer_type_definition.py | 2 +- .../classify/interface_constant_declaration.py | 2 +- vsg/vhdlFile/classify/interface_declaration.py | 4 +++- vsg/vhdlFile/classify/interface_element.py | 2 +- .../classify/interface_file_declaration.py | 2 +- .../interface_function_specification.py | 2 +- .../interface_incomplete_type_declaration.py | 2 +- vsg/vhdlFile/classify/interface_list.py | 2 +- .../classify/interface_object_declaration.py | 4 +++- .../classify/interface_package_declaration.py | 2 +- .../interface_package_generic_map_aspect.py | 2 +- .../interface_procedure_specification.py | 2 +- .../classify/interface_signal_declaration.py | 2 +- .../interface_subprogram_declaration.py | 18 +++++++++--------- .../classify/interface_subprogram_default.py | 2 +- .../interface_subprogram_specification.py | 6 +++--- .../classify/interface_type_declaration.py | 2 +- .../classify/interface_unknown_declaration.py | 2 +- .../classify/interface_variable_declaration.py | 2 +- vsg/vhdlFile/classify/iteration_scheme.py | 2 +- vsg/vhdlFile/classify/library_clause.py | 2 +- vsg/vhdlFile/classify/library_unit.py | 2 +- vsg/vhdlFile/classify/logical_name_list.py | 2 +- vsg/vhdlFile/classify/loop_statement.py | 2 +- vsg/vhdlFile/classify/mode.py | 2 +- vsg/vhdlFile/classify/name.py | 3 +-- vsg/vhdlFile/classify/next_statement.py | 2 +- vsg/vhdlFile/classify/null_statement.py | 2 +- vsg/vhdlFile/classify/package_body.py | 2 +- .../classify/package_body_declarative_item.py | 2 +- .../classify/package_body_declarative_part.py | 2 +- vsg/vhdlFile/classify/package_declaration.py | 2 +- .../classify/package_declarative_item.py | 2 +- .../classify/package_declarative_part.py | 2 +- vsg/vhdlFile/classify/package_header.py | 2 +- .../package_instantiation_declaration.py | 2 +- .../classify/parameter_specification.py | 2 +- .../classify/physical_type_definition.py | 2 +- vsg/vhdlFile/classify/port_clause.py | 2 +- vsg/vhdlFile/classify/port_list.py | 2 +- vsg/vhdlFile/classify/port_map_aspect.py | 2 +- vsg/vhdlFile/classify/prefix.py | 3 +-- vsg/vhdlFile/classify/primary_unit.py | 2 +- .../classify/primary_unit_declaration.py | 2 +- vsg/vhdlFile/classify/procedure_call.py | 2 +- .../classify/procedure_call_statement.py | 2 +- .../classify/procedure_specification.py | 2 +- .../classify/process_declarative_item.py | 2 +- .../classify/process_declarative_part.py | 2 +- .../classify/process_sensitivity_list.py | 2 +- vsg/vhdlFile/classify/process_statement.py | 2 +- .../classify/process_statement_part.py | 2 +- vsg/vhdlFile/classify/protected_type_body.py | 2 +- .../protected_type_body_declarative_item.py | 2 +- .../protected_type_body_declarative_part.py | 2 +- .../classify/protected_type_declaration.py | 2 +- .../protected_type_declarative_item.py | 2 +- .../protected_type_declarative_part.py | 2 +- .../classify/protected_type_definition.py | 2 +- vsg/vhdlFile/classify/range.py | 2 +- vsg/vhdlFile/classify/range_constraint.py | 3 +-- vsg/vhdlFile/classify/record_constraint.py | 2 +- .../classify/record_element_constraint.py | 2 +- .../classify/record_type_definition.py | 2 +- vsg/vhdlFile/classify/report_statement.py | 2 +- vsg/vhdlFile/classify/resolution_indication.py | 3 +-- vsg/vhdlFile/classify/return_statement.py | 2 +- .../classify/scalar_type_definition.py | 2 +- vsg/vhdlFile/classify/secondary_unit.py | 2 +- .../classify/secondary_unit_declaration.py | 2 +- vsg/vhdlFile/classify/selected_expressions.py | 2 +- .../classify/selected_force_assignment.py | 2 +- .../classify/selected_signal_assignment.py | 2 +- .../classify/selected_variable_assignment.py | 2 +- .../classify/selected_waveform_assignment.py | 2 +- vsg/vhdlFile/classify/selected_waveforms.py | 3 +-- vsg/vhdlFile/classify/sensitivity_clause.py | 2 +- vsg/vhdlFile/classify/sensitivity_list.py | 3 +-- .../classify/sequence_of_statements.py | 2 +- vsg/vhdlFile/classify/sequential_statement.py | 2 +- .../classify/signal_assignment_statement.py | 2 +- vsg/vhdlFile/classify/signal_declaration.py | 2 +- vsg/vhdlFile/classify/signal_kind.py | 2 +- vsg/vhdlFile/classify/signature.py | 2 +- .../simple_configuration_specification.py | 2 +- .../classify/simple_force_assignment.py | 2 +- .../classify/simple_release_assignment.py | 2 +- .../classify/simple_signal_assignment.py | 2 +- .../classify/simple_variable_assignment.py | 2 +- .../classify/simple_waveform_assignment.py | 2 +- vsg/vhdlFile/classify/subprogram_body.py | 2 +- .../classify/subprogram_declaration.py | 2 +- .../classify/subprogram_declarative_item.py | 2 +- .../classify/subprogram_declarative_part.py | 2 +- vsg/vhdlFile/classify/subprogram_header.py | 2 +- .../subprogram_instantiation_declaration.py | 2 +- vsg/vhdlFile/classify/subprogram_kind.py | 2 +- .../classify/subprogram_specification.py | 2 +- .../classify/subprogram_statement_part.py | 2 +- vsg/vhdlFile/classify/subtype_declaration.py | 2 +- vsg/vhdlFile/classify/subtype_indication.py | 2 +- vsg/vhdlFile/classify/target.py | 2 +- vsg/vhdlFile/classify/timeout_clause.py | 2 +- vsg/vhdlFile/classify/type_declaration.py | 2 +- vsg/vhdlFile/classify/type_definition.py | 2 +- vsg/vhdlFile/classify/type_mark.py | 2 +- .../classify/unbounded_array_definition.py | 2 +- vsg/vhdlFile/classify/use_clause.py | 2 +- vsg/vhdlFile/classify/utils.py | 5 ++--- .../classify/variable_assignment_statement.py | 2 +- vsg/vhdlFile/classify/variable_declaration.py | 2 +- vsg/vhdlFile/classify/wait_statement.py | 2 +- vsg/vhdlFile/classify/waveform.py | 3 +-- vsg/vhdlFile/classify/waveform_element.py | 2 +- 231 files changed, 257 insertions(+), 260 deletions(-) diff --git a/vsg/decorators.py b/vsg/decorators.py index 3943fe1d6..77f39cabe 100644 --- a/vsg/decorators.py +++ b/vsg/decorators.py @@ -1,6 +1,7 @@ - +# -*- coding: utf-8 -*- import functools + def print_method_name(func): @functools.wraps(func) def wrapper(*args, **kwargs): @@ -8,32 +9,38 @@ def wrapper(*args, **kwargs): print(f"-->> {__name__}") print(f"Calling method: {class_name}.{func.__name__}") return func(*args, **kwargs) + return wrapper + level = 0 display = False + def print_classifier_debug_info(argument): print_classifier_debug_info.level = 0 + def decorator(function): def wrapper(*args, **kwargs): if display: global level - sArgument = argument.replace("vsg.vhdlFile.classify.","") + sArgument = argument.replace("vsg.vhdlFile.classify.", "") sLevel = " " * (2 * level) sEntering = f"Entering: {sLevel} {sArgument}.{function.__name__} " - sEntering += "-"*(100 - len(sEntering)) + sEntering += "-" * (100 - len(sEntering)) print(sEntering) level += 1 results = function(*args, **kwargs) - if display: + if display: sExiting = f"Exiting: {sLevel} {sArgument}.{function.__name__} == {results} " - sExiting += "-"*(100 - len(sExiting)) + sExiting += "-" * (100 - len(sExiting)) print(sExiting) level -= 1 return results + return wrapper + return decorator diff --git a/vsg/vhdlFile/classify/access_type_definition.py b/vsg/vhdlFile/classify/access_type_definition.py index 0f8600238..e7dd32d53 100644 --- a/vsg/vhdlFile/classify/access_type_definition.py +++ b/vsg/vhdlFile/classify/access_type_definition.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import access_type_definition as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/actual_parameter_part.py b/vsg/vhdlFile/classify/actual_parameter_part.py index 048cb6d26..a5a484267 100644 --- a/vsg/vhdlFile/classify/actual_parameter_part.py +++ b/vsg/vhdlFile/classify/actual_parameter_part.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import association_list from vsg import decorators +from vsg.vhdlFile.classify import association_list @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/alias_declaration.py b/vsg/vhdlFile/classify/alias_declaration.py index 5cef30b7f..ca6aedc09 100644 --- a/vsg/vhdlFile/classify/alias_declaration.py +++ b/vsg/vhdlFile/classify/alias_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import alias_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import name, signature, subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/architecture_body.py b/vsg/vhdlFile/classify/architecture_body.py index 914c3a629..4b22d3f1f 100644 --- a/vsg/vhdlFile/classify/architecture_body.py +++ b/vsg/vhdlFile/classify/architecture_body.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import architecture_body as token from vsg.vhdlFile.classify import ( architecture_declarative_part, architecture_statement_part, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/architecture_declarative_part.py b/vsg/vhdlFile/classify/architecture_declarative_part.py index f84bb26f6..86a169f0f 100644 --- a/vsg/vhdlFile/classify/architecture_declarative_part.py +++ b/vsg/vhdlFile/classify/architecture_declarative_part.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile import utils from vsg.vhdlFile.classify import block_declarative_item -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/architecture_statement_part.py b/vsg/vhdlFile/classify/architecture_statement_part.py index 4d900a9bf..05e884a63 100644 --- a/vsg/vhdlFile/classify/architecture_statement_part.py +++ b/vsg/vhdlFile/classify/architecture_statement_part.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import concurrent_statement from vsg import decorators +from vsg.vhdlFile.classify import concurrent_statement @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/array_constraint.py b/vsg/vhdlFile/classify/array_constraint.py index f7e61de2a..615402e90 100644 --- a/vsg/vhdlFile/classify/array_constraint.py +++ b/vsg/vhdlFile/classify/array_constraint.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import array_constraint as token from vsg.vhdlFile.classify import array_element_constraint, index_constraint -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/array_element_constraint.py b/vsg/vhdlFile/classify/array_element_constraint.py index a150ed171..34aba859d 100644 --- a/vsg/vhdlFile/classify/array_element_constraint.py +++ b/vsg/vhdlFile/classify/array_element_constraint.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import element_constraint from vsg import decorators +from vsg.vhdlFile.classify import element_constraint @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/array_type_definition.py b/vsg/vhdlFile/classify/array_type_definition.py index c15556087..84bb5cfab 100644 --- a/vsg/vhdlFile/classify/array_type_definition.py +++ b/vsg/vhdlFile/classify/array_type_definition.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( constrained_array_definition, unbounded_array_definition, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/assertion.py b/vsg/vhdlFile/classify/assertion.py index 01b3244a3..f31a13fae 100644 --- a/vsg/vhdlFile/classify/assertion.py +++ b/vsg/vhdlFile/classify/assertion.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import assertion as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import condition, expression -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/assertion_statement.py b/vsg/vhdlFile/classify/assertion_statement.py index 214ec7e99..cbd478bf5 100644 --- a/vsg/vhdlFile/classify/assertion_statement.py +++ b/vsg/vhdlFile/classify/assertion_statement.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import assertion_statement as token from vsg.vhdlFile.classify import assertion, utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/association_element.py b/vsg/vhdlFile/classify/association_element.py index aee916266..7d723ddac 100644 --- a/vsg/vhdlFile/classify/association_element.py +++ b/vsg/vhdlFile/classify/association_element.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import association_element as token from vsg.vhdlFile.classify import formal_part -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/association_list.py b/vsg/vhdlFile/classify/association_list.py index 4a31a473b..190b9d33f 100644 --- a/vsg/vhdlFile/classify/association_list.py +++ b/vsg/vhdlFile/classify/association_list.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import association_list as token from vsg.vhdlFile.classify import association_element -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/attribute_declaration.py b/vsg/vhdlFile/classify/attribute_declaration.py index fc12120ba..7ae6416c0 100644 --- a/vsg/vhdlFile/classify/attribute_declaration.py +++ b/vsg/vhdlFile/classify/attribute_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import attribute_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import type_mark -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/attribute_name.py b/vsg/vhdlFile/classify/attribute_name.py index f700624a5..ad21f076f 100644 --- a/vsg/vhdlFile/classify/attribute_name.py +++ b/vsg/vhdlFile/classify/attribute_name.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- -from vsg import parser +from vsg import decorators, parser from vsg.token import attribute_name as token from vsg.vhdlFile.classify import expression, prefix, signature -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/attribute_specification.py b/vsg/vhdlFile/classify/attribute_specification.py index 972d8ba1b..13d80bc92 100644 --- a/vsg/vhdlFile/classify/attribute_specification.py +++ b/vsg/vhdlFile/classify/attribute_specification.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import attribute_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_specification, expression -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/binding_indication.py b/vsg/vhdlFile/classify/binding_indication.py index 7fd7f8346..930b85d3a 100644 --- a/vsg/vhdlFile/classify/binding_indication.py +++ b/vsg/vhdlFile/classify/binding_indication.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import binding_indication as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_aspect, generic_map_aspect, port_map_aspect -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/bit_string_literal.py b/vsg/vhdlFile/classify/bit_string_literal.py index 21bbf4fd9..0bea395ec 100644 --- a/vsg/vhdlFile/classify/bit_string_literal.py +++ b/vsg/vhdlFile/classify/bit_string_literal.py @@ -2,8 +2,8 @@ import re -from vsg.token import bit_string_literal as token from vsg import decorators +from vsg.token import bit_string_literal as token oIntegerRegex = re.compile(r"\d+") oBaseSpecifierRegex = re.compile(r"(([us]?[box])|d)") diff --git a/vsg/vhdlFile/classify/block_configuration.py b/vsg/vhdlFile/classify/block_configuration.py index 1f457d621..a85912f86 100644 --- a/vsg/vhdlFile/classify/block_configuration.py +++ b/vsg/vhdlFile/classify/block_configuration.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import block_configuration as token from vsg.vhdlFile.classify import block_specification, configuration_item, use_clause -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/block_declarative_item.py b/vsg/vhdlFile/classify/block_declarative_item.py index 43f7cbb27..f4f98b35e 100644 --- a/vsg/vhdlFile/classify/block_declarative_item.py +++ b/vsg/vhdlFile/classify/block_declarative_item.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( alias_declaration, attribute_declaration, @@ -20,7 +21,6 @@ use_clause, variable_declaration, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/block_declarative_part.py b/vsg/vhdlFile/classify/block_declarative_part.py index e3e00a2ef..b4d5a6b19 100644 --- a/vsg/vhdlFile/classify/block_declarative_part.py +++ b/vsg/vhdlFile/classify/block_declarative_part.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile import utils from vsg.vhdlFile.classify import block_declarative_item -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/block_header.py b/vsg/vhdlFile/classify/block_header.py index 79911bc0c..fab399cb8 100644 --- a/vsg/vhdlFile/classify/block_header.py +++ b/vsg/vhdlFile/classify/block_header.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import block_header as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( @@ -8,7 +9,6 @@ port_clause, port_map_aspect, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/block_specification.py b/vsg/vhdlFile/classify/block_specification.py index 90169acd6..61b143bb5 100644 --- a/vsg/vhdlFile/classify/block_specification.py +++ b/vsg/vhdlFile/classify/block_specification.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import block_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generate_specification -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/block_statement.py b/vsg/vhdlFile/classify/block_statement.py index cca4cc3db..aef744d46 100644 --- a/vsg/vhdlFile/classify/block_statement.py +++ b/vsg/vhdlFile/classify/block_statement.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import block_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( @@ -7,7 +8,6 @@ block_header, block_statement_part, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/block_statement_part.py b/vsg/vhdlFile/classify/block_statement_part.py index 88e294c98..4f8d0ac86 100644 --- a/vsg/vhdlFile/classify/block_statement_part.py +++ b/vsg/vhdlFile/classify/block_statement_part.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile import utils from vsg.vhdlFile.classify import concurrent_statement -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/case_generate_alternative.py b/vsg/vhdlFile/classify/case_generate_alternative.py index b8b05c6cf..711bc47b3 100644 --- a/vsg/vhdlFile/classify/case_generate_alternative.py +++ b/vsg/vhdlFile/classify/case_generate_alternative.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import case_generate_alternative as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import choices, generate_statement_body -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/case_generate_statement.py b/vsg/vhdlFile/classify/case_generate_statement.py index 28ff2c783..959ff44c0 100644 --- a/vsg/vhdlFile/classify/case_generate_statement.py +++ b/vsg/vhdlFile/classify/case_generate_statement.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import case_generate_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import case_generate_alternative, expression -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/case_statement.py b/vsg/vhdlFile/classify/case_statement.py index ed4cc90b3..eba55aa6c 100644 --- a/vsg/vhdlFile/classify/case_statement.py +++ b/vsg/vhdlFile/classify/case_statement.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import case_statement as token from vsg.vhdlFile.classify import case_statement_alternative, expression, utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/case_statement_alternative.py b/vsg/vhdlFile/classify/case_statement_alternative.py index 0acf50b18..57b521d23 100644 --- a/vsg/vhdlFile/classify/case_statement_alternative.py +++ b/vsg/vhdlFile/classify/case_statement_alternative.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import case_statement_alternative as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import choices, sequence_of_statements -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/character_literal.py b/vsg/vhdlFile/classify/character_literal.py index ff716850b..c5736d22e 100644 --- a/vsg/vhdlFile/classify/character_literal.py +++ b/vsg/vhdlFile/classify/character_literal.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- -from vsg import parser -from vsg import decorators +from vsg import decorators, parser @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/choice.py b/vsg/vhdlFile/classify/choice.py index eeba6d2fa..9772e7133 100644 --- a/vsg/vhdlFile/classify/choice.py +++ b/vsg/vhdlFile/classify/choice.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- -from vsg import parser +from vsg import decorators, parser from vsg.token import choice as token from vsg.vhdlFile import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/choices.py b/vsg/vhdlFile/classify/choices.py index cb5ab92bb..513841e4c 100644 --- a/vsg/vhdlFile/classify/choices.py +++ b/vsg/vhdlFile/classify/choices.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import choices as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import choice -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/component_configuration.py b/vsg/vhdlFile/classify/component_configuration.py index 20b3dc6cc..a0baf8182 100644 --- a/vsg/vhdlFile/classify/component_configuration.py +++ b/vsg/vhdlFile/classify/component_configuration.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import component_configuration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( @@ -7,7 +8,6 @@ block_configuration, component_specification, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/component_declaration.py b/vsg/vhdlFile/classify/component_declaration.py index ad2d500fb..8ecb61cad 100644 --- a/vsg/vhdlFile/classify/component_declaration.py +++ b/vsg/vhdlFile/classify/component_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import component_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_clause, port_clause -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/component_instantiation_statement.py b/vsg/vhdlFile/classify/component_instantiation_statement.py index 50887c638..256e2c5c7 100644 --- a/vsg/vhdlFile/classify/component_instantiation_statement.py +++ b/vsg/vhdlFile/classify/component_instantiation_statement.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import component_instantiation_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_map_aspect, instantiated_unit, port_map_aspect -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/component_specification.py b/vsg/vhdlFile/classify/component_specification.py index a0d5e55af..d5d652338 100644 --- a/vsg/vhdlFile/classify/component_specification.py +++ b/vsg/vhdlFile/classify/component_specification.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import component_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import instantiation_list -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/composite_type_definition.py b/vsg/vhdlFile/classify/composite_type_definition.py index f4012da54..b9f2f7a62 100644 --- a/vsg/vhdlFile/classify/composite_type_definition.py +++ b/vsg/vhdlFile/classify/composite_type_definition.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import array_type_definition, record_type_definition from vsg import decorators +from vsg.vhdlFile.classify import array_type_definition, record_type_definition @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/concurrent_assertion_statement.py b/vsg/vhdlFile/classify/concurrent_assertion_statement.py index 9ce74eac4..7613e2cbb 100644 --- a/vsg/vhdlFile/classify/concurrent_assertion_statement.py +++ b/vsg/vhdlFile/classify/concurrent_assertion_statement.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import concurrent_assertion_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import assertion -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py index e80580b5c..8a5d70d93 100644 --- a/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import concurrent_conditional_signal_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import conditional_waveforms, delay_mechanism -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py b/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py index 745f966b0..b581e7e02 100644 --- a/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py +++ b/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import concurrent_procedure_call_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import procedure_call -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py index 505319e08..a1524ced5 100644 --- a/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import concurrent_selected_signal_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import delay_mechanism, expression, selected_waveforms -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py b/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py index b07e5d099..66b8dd261 100644 --- a/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py +++ b/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import concurrent_signal_assignment_statement as token from vsg.vhdlFile.classify import ( concurrent_conditional_signal_assignment, @@ -7,7 +8,6 @@ concurrent_simple_signal_assignment, utils, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py index 33dae0813..d4852b21f 100644 --- a/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_simple_signal_assignment.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import concurrent_simple_signal_assignment as token from vsg.vhdlFile.classify import delay_mechanism, utils, waveform -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/concurrent_statement.py b/vsg/vhdlFile/classify/concurrent_statement.py index 68f3a65f8..1a340dab1 100644 --- a/vsg/vhdlFile/classify/concurrent_statement.py +++ b/vsg/vhdlFile/classify/concurrent_statement.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( block_statement, component_instantiation_statement, @@ -9,7 +10,6 @@ generate_statement, process_statement, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/condition.py b/vsg/vhdlFile/classify/condition.py index 514076397..25c8cfb06 100644 --- a/vsg/vhdlFile/classify/condition.py +++ b/vsg/vhdlFile/classify/condition.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import expression from vsg import decorators +from vsg.vhdlFile.classify import expression @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/condition_clause.py b/vsg/vhdlFile/classify/condition_clause.py index 87728a5d6..39b5d2c3c 100644 --- a/vsg/vhdlFile/classify/condition_clause.py +++ b/vsg/vhdlFile/classify/condition_clause.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import condition_clause as token from vsg.vhdlFile.classify import condition -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/conditional_expressions.py b/vsg/vhdlFile/classify/conditional_expressions.py index 32fed07d8..3b5f54243 100644 --- a/vsg/vhdlFile/classify/conditional_expressions.py +++ b/vsg/vhdlFile/classify/conditional_expressions.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import conditional_expressions as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import condition, expression -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/conditional_force_assignment.py b/vsg/vhdlFile/classify/conditional_force_assignment.py index 422a254ee..864e018fd 100644 --- a/vsg/vhdlFile/classify/conditional_force_assignment.py +++ b/vsg/vhdlFile/classify/conditional_force_assignment.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import conditional_force_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import conditional_expressions, force_mode -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/conditional_signal_assignment.py b/vsg/vhdlFile/classify/conditional_signal_assignment.py index 58962ce72..52f2f1e9d 100644 --- a/vsg/vhdlFile/classify/conditional_signal_assignment.py +++ b/vsg/vhdlFile/classify/conditional_signal_assignment.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( conditional_force_assignment, conditional_waveform_assignment, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/conditional_variable_assignment.py b/vsg/vhdlFile/classify/conditional_variable_assignment.py index aa184eb70..00f7e7c6c 100644 --- a/vsg/vhdlFile/classify/conditional_variable_assignment.py +++ b/vsg/vhdlFile/classify/conditional_variable_assignment.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import conditional_variable_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import conditional_expressions -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/conditional_waveform_assignment.py b/vsg/vhdlFile/classify/conditional_waveform_assignment.py index bd77e2e83..181dab5a5 100644 --- a/vsg/vhdlFile/classify/conditional_waveform_assignment.py +++ b/vsg/vhdlFile/classify/conditional_waveform_assignment.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import conditional_waveform_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import conditional_waveforms, delay_mechanism -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/conditional_waveforms.py b/vsg/vhdlFile/classify/conditional_waveforms.py index 901096c9c..f93eb7d1d 100644 --- a/vsg/vhdlFile/classify/conditional_waveforms.py +++ b/vsg/vhdlFile/classify/conditional_waveforms.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import conditional_waveforms as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import condition, waveform -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/configuration_declaration.py b/vsg/vhdlFile/classify/configuration_declaration.py index 08bde5a51..ac0c38509 100644 --- a/vsg/vhdlFile/classify/configuration_declaration.py +++ b/vsg/vhdlFile/classify/configuration_declaration.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import configuration_declaration as token from vsg.vhdlFile.classify import block_configuration, configuration_declarative_part -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/configuration_declarative_item.py b/vsg/vhdlFile/classify/configuration_declarative_item.py index f8fc9662a..ca40b9c48 100644 --- a/vsg/vhdlFile/classify/configuration_declarative_item.py +++ b/vsg/vhdlFile/classify/configuration_declarative_item.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import attribute_specification, group_declaration, use_clause from vsg import decorators +from vsg.vhdlFile.classify import attribute_specification, group_declaration, use_clause @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/configuration_declarative_part.py b/vsg/vhdlFile/classify/configuration_declarative_part.py index a966cb5de..7120d4342 100644 --- a/vsg/vhdlFile/classify/configuration_declarative_part.py +++ b/vsg/vhdlFile/classify/configuration_declarative_part.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import configuration_declarative_item from vsg import decorators +from vsg.vhdlFile.classify import configuration_declarative_item @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/configuration_item.py b/vsg/vhdlFile/classify/configuration_item.py index 051dea280..f49385b7c 100644 --- a/vsg/vhdlFile/classify/configuration_item.py +++ b/vsg/vhdlFile/classify/configuration_item.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import block_configuration, component_configuration from vsg import decorators +from vsg.vhdlFile.classify import block_configuration, component_configuration @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/configuration_specification.py b/vsg/vhdlFile/classify/configuration_specification.py index 9aaa496aa..607a14a40 100644 --- a/vsg/vhdlFile/classify/configuration_specification.py +++ b/vsg/vhdlFile/classify/configuration_specification.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import simple_configuration_specification from vsg import decorators +from vsg.vhdlFile.classify import simple_configuration_specification @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/constant_declaration.py b/vsg/vhdlFile/classify/constant_declaration.py index 31499ba4d..fc25da1aa 100644 --- a/vsg/vhdlFile/classify/constant_declaration.py +++ b/vsg/vhdlFile/classify/constant_declaration.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import constant_declaration as token from vsg.vhdlFile.classify import expression, identifier_list, subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/constrained_array_definition.py b/vsg/vhdlFile/classify/constrained_array_definition.py index 58f3b9bf0..38fa7a509 100644 --- a/vsg/vhdlFile/classify/constrained_array_definition.py +++ b/vsg/vhdlFile/classify/constrained_array_definition.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import constrained_array_definition as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import index_constraint, subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/constraint.py b/vsg/vhdlFile/classify/constraint.py index 4a2fce5e7..4ba21bddc 100644 --- a/vsg/vhdlFile/classify/constraint.py +++ b/vsg/vhdlFile/classify/constraint.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import array_constraint, range_constraint, record_constraint from vsg import decorators +from vsg.vhdlFile.classify import array_constraint, range_constraint, record_constraint @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/context_clause.py b/vsg/vhdlFile/classify/context_clause.py index 7d39bdd3d..d303c6bc2 100644 --- a/vsg/vhdlFile/classify/context_clause.py +++ b/vsg/vhdlFile/classify/context_clause.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import context_item, utils from vsg import decorators +from vsg.vhdlFile.classify import context_item, utils @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/context_declaration.py b/vsg/vhdlFile/classify/context_declaration.py index ffeb9bb5f..3ee00e43e 100644 --- a/vsg/vhdlFile/classify/context_declaration.py +++ b/vsg/vhdlFile/classify/context_declaration.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import context_declaration as token from vsg.vhdlFile.classify import context_clause -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/context_item.py b/vsg/vhdlFile/classify/context_item.py index f49b05b99..ee0d027c8 100644 --- a/vsg/vhdlFile/classify/context_item.py +++ b/vsg/vhdlFile/classify/context_item.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import context_reference, library_clause, use_clause from vsg import decorators +from vsg.vhdlFile.classify import context_reference, library_clause, use_clause @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/context_reference.py b/vsg/vhdlFile/classify/context_reference.py index 6a4b2380b..06c8b2dcb 100644 --- a/vsg/vhdlFile/classify/context_reference.py +++ b/vsg/vhdlFile/classify/context_reference.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import context_reference as token from vsg.vhdlFile.classify import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/delay_mechanism.py b/vsg/vhdlFile/classify/delay_mechanism.py index b31847c88..9ba461abc 100644 --- a/vsg/vhdlFile/classify/delay_mechanism.py +++ b/vsg/vhdlFile/classify/delay_mechanism.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import delay_mechanism as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/design_file.py b/vsg/vhdlFile/classify/design_file.py index b39025d16..b292db54a 100644 --- a/vsg/vhdlFile/classify/design_file.py +++ b/vsg/vhdlFile/classify/design_file.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import design_unit from vsg import decorators +from vsg.vhdlFile.classify import design_unit @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/design_unit.py b/vsg/vhdlFile/classify/design_unit.py index 6b7789402..ccf15e76f 100644 --- a/vsg/vhdlFile/classify/design_unit.py +++ b/vsg/vhdlFile/classify/design_unit.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import context_clause, library_unit from vsg import decorators +from vsg.vhdlFile.classify import context_clause, library_unit @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/discrete_range.py b/vsg/vhdlFile/classify/discrete_range.py index 11217f427..4cb451fc3 100644 --- a/vsg/vhdlFile/classify/discrete_range.py +++ b/vsg/vhdlFile/classify/discrete_range.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- -from vsg import parser +from vsg import decorators, parser from vsg.vhdlFile import utils from vsg.vhdlFile.classify import range, subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/element_constraint.py b/vsg/vhdlFile/classify/element_constraint.py index 4372675ff..2de4636b9 100644 --- a/vsg/vhdlFile/classify/element_constraint.py +++ b/vsg/vhdlFile/classify/element_constraint.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import array_constraint, record_constraint from vsg import decorators +from vsg.vhdlFile.classify import array_constraint, record_constraint @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/element_declaration.py b/vsg/vhdlFile/classify/element_declaration.py index 955e9423a..f73715093 100644 --- a/vsg/vhdlFile/classify/element_declaration.py +++ b/vsg/vhdlFile/classify/element_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import element_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import element_subtype_definition, identifier_list -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/element_resolution.py b/vsg/vhdlFile/classify/element_resolution.py index d131b207f..77b3a91ab 100644 --- a/vsg/vhdlFile/classify/element_resolution.py +++ b/vsg/vhdlFile/classify/element_resolution.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile import utils from vsg import decorators +from vsg.vhdlFile import utils @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/element_subtype_definition.py b/vsg/vhdlFile/classify/element_subtype_definition.py index 59977439d..d4f480d0e 100644 --- a/vsg/vhdlFile/classify/element_subtype_definition.py +++ b/vsg/vhdlFile/classify/element_subtype_definition.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import subtype_indication from vsg import decorators +from vsg.vhdlFile.classify import subtype_indication @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/entity_aspect.py b/vsg/vhdlFile/classify/entity_aspect.py index 568d3f6ec..522a4ddb2 100644 --- a/vsg/vhdlFile/classify/entity_aspect.py +++ b/vsg/vhdlFile/classify/entity_aspect.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import entity_aspect as token from vsg.vhdlFile import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/entity_declaration.py b/vsg/vhdlFile/classify/entity_declaration.py index c0c3ae2d7..0881a1a3a 100644 --- a/vsg/vhdlFile/classify/entity_declaration.py +++ b/vsg/vhdlFile/classify/entity_declaration.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import entity_declaration as token from vsg.vhdlFile.classify import ( entity_declarative_part, entity_header, entity_statement_part, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/entity_declarative_item.py b/vsg/vhdlFile/classify/entity_declarative_item.py index f3f5ca801..7a5090b40 100644 --- a/vsg/vhdlFile/classify/entity_declarative_item.py +++ b/vsg/vhdlFile/classify/entity_declarative_item.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( alias_declaration, attribute_declaration, @@ -19,7 +20,6 @@ use_clause, variable_declaration, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/entity_declarative_part.py b/vsg/vhdlFile/classify/entity_declarative_part.py index 057216bd5..43f14e473 100644 --- a/vsg/vhdlFile/classify/entity_declarative_part.py +++ b/vsg/vhdlFile/classify/entity_declarative_part.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import entity_declarative_item from vsg import decorators +from vsg.vhdlFile.classify import entity_declarative_item @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/entity_designator.py b/vsg/vhdlFile/classify/entity_designator.py index 92b32c3f0..8e39ea21c 100644 --- a/vsg/vhdlFile/classify/entity_designator.py +++ b/vsg/vhdlFile/classify/entity_designator.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import entity_designator as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import signature -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/entity_header.py b/vsg/vhdlFile/classify/entity_header.py index 134f55808..ea84a4af4 100644 --- a/vsg/vhdlFile/classify/entity_header.py +++ b/vsg/vhdlFile/classify/entity_header.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import generic_clause, port_clause from vsg import decorators +from vsg.vhdlFile.classify import generic_clause, port_clause @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/entity_name_list.py b/vsg/vhdlFile/classify/entity_name_list.py index 6493b6b97..9e1dde3d8 100644 --- a/vsg/vhdlFile/classify/entity_name_list.py +++ b/vsg/vhdlFile/classify/entity_name_list.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import entity_name_list as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_designator -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/entity_specification.py b/vsg/vhdlFile/classify/entity_specification.py index ad863cd63..b89a9beef 100644 --- a/vsg/vhdlFile/classify/entity_specification.py +++ b/vsg/vhdlFile/classify/entity_specification.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import entity_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_name_list -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/entity_statement.py b/vsg/vhdlFile/classify/entity_statement.py index 66e86db75..8c49c9b09 100644 --- a/vsg/vhdlFile/classify/entity_statement.py +++ b/vsg/vhdlFile/classify/entity_statement.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( concurrent_assertion_statement, concurrent_procedure_call_statement, process_statement, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/entity_statement_part.py b/vsg/vhdlFile/classify/entity_statement_part.py index 8071c522d..8d5bafb82 100644 --- a/vsg/vhdlFile/classify/entity_statement_part.py +++ b/vsg/vhdlFile/classify/entity_statement_part.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_statement -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/enumeration_type_definition.py b/vsg/vhdlFile/classify/enumeration_type_definition.py index 0b6241334..1540dd680 100644 --- a/vsg/vhdlFile/classify/enumeration_type_definition.py +++ b/vsg/vhdlFile/classify/enumeration_type_definition.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import enumeration_type_definition as token from vsg.vhdlFile import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/exit_statement.py b/vsg/vhdlFile/classify/exit_statement.py index 8992019ad..bec9f2372 100644 --- a/vsg/vhdlFile/classify/exit_statement.py +++ b/vsg/vhdlFile/classify/exit_statement.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import exit_statement as token from vsg.vhdlFile.classify import condition, utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/expression.py b/vsg/vhdlFile/classify/expression.py index 697755260..e632e9533 100644 --- a/vsg/vhdlFile/classify/expression.py +++ b/vsg/vhdlFile/classify/expression.py @@ -1,13 +1,12 @@ # -*- coding: utf-8 -*- -from vsg import parser +from vsg import decorators, parser from vsg.vhdlFile.classify import ( bit_string_literal, character_literal, external_name, utils, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/external_constant_name.py b/vsg/vhdlFile/classify/external_constant_name.py index 6333b4dec..282e29c09 100644 --- a/vsg/vhdlFile/classify/external_constant_name.py +++ b/vsg/vhdlFile/classify/external_constant_name.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import external_constant_name as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/external_name.py b/vsg/vhdlFile/classify/external_name.py index 720ad383a..6af14b210 100644 --- a/vsg/vhdlFile/classify/external_name.py +++ b/vsg/vhdlFile/classify/external_name.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( external_constant_name, external_signal_name, external_variable_name, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/external_signal_name.py b/vsg/vhdlFile/classify/external_signal_name.py index d13f6c0c9..60b92164e 100644 --- a/vsg/vhdlFile/classify/external_signal_name.py +++ b/vsg/vhdlFile/classify/external_signal_name.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import external_signal_name as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/external_variable_name.py b/vsg/vhdlFile/classify/external_variable_name.py index 8a5602f57..030909ab3 100644 --- a/vsg/vhdlFile/classify/external_variable_name.py +++ b/vsg/vhdlFile/classify/external_variable_name.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import external_variable_name as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/file_declaration.py b/vsg/vhdlFile/classify/file_declaration.py index 55d024598..4eb5c3ee9 100644 --- a/vsg/vhdlFile/classify/file_declaration.py +++ b/vsg/vhdlFile/classify/file_declaration.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import file_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( @@ -7,7 +8,6 @@ identifier_list, subtype_indication, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/file_logical_name.py b/vsg/vhdlFile/classify/file_logical_name.py index bf5f76926..121562415 100644 --- a/vsg/vhdlFile/classify/file_logical_name.py +++ b/vsg/vhdlFile/classify/file_logical_name.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import expression from vsg import decorators +from vsg.vhdlFile.classify import expression @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/file_open_information.py b/vsg/vhdlFile/classify/file_open_information.py index 7ce424826..96d383164 100644 --- a/vsg/vhdlFile/classify/file_open_information.py +++ b/vsg/vhdlFile/classify/file_open_information.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import file_open_information as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import file_logical_name -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/file_type_definition.py b/vsg/vhdlFile/classify/file_type_definition.py index 652c8f1c7..76781187b 100644 --- a/vsg/vhdlFile/classify/file_type_definition.py +++ b/vsg/vhdlFile/classify/file_type_definition.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import file_type_definition as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import type_mark -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/for_generate_statement.py b/vsg/vhdlFile/classify/for_generate_statement.py index 5463278f5..ac4739dec 100644 --- a/vsg/vhdlFile/classify/for_generate_statement.py +++ b/vsg/vhdlFile/classify/for_generate_statement.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import for_generate_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generate_statement_body, parameter_specification -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/force_mode.py b/vsg/vhdlFile/classify/force_mode.py index 685e9337e..107f74e56 100644 --- a/vsg/vhdlFile/classify/force_mode.py +++ b/vsg/vhdlFile/classify/force_mode.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import force_mode as token from vsg.vhdlFile import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/formal_parameter_list.py b/vsg/vhdlFile/classify/formal_parameter_list.py index a98bfcf3e..1bc65e9b5 100644 --- a/vsg/vhdlFile/classify/formal_parameter_list.py +++ b/vsg/vhdlFile/classify/formal_parameter_list.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import interface_list from vsg import decorators +from vsg.vhdlFile.classify import interface_list @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/formal_part.py b/vsg/vhdlFile/classify/formal_part.py index 4b8a931c7..899c887c8 100644 --- a/vsg/vhdlFile/classify/formal_part.py +++ b/vsg/vhdlFile/classify/formal_part.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- -from vsg import parser -from vsg import decorators +from vsg import decorators, parser @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/full_type_declaration.py b/vsg/vhdlFile/classify/full_type_declaration.py index a404af9b7..84bfee5ac 100644 --- a/vsg/vhdlFile/classify/full_type_declaration.py +++ b/vsg/vhdlFile/classify/full_type_declaration.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import full_type_declaration as token from vsg.vhdlFile.classify import identifier, type_definition -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/function_specification.py b/vsg/vhdlFile/classify/function_specification.py index 89b65290d..eb8d95142 100644 --- a/vsg/vhdlFile/classify/function_specification.py +++ b/vsg/vhdlFile/classify/function_specification.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import function_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import formal_parameter_list, subprogram_header, type_mark -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/generate_specification.py b/vsg/vhdlFile/classify/generate_specification.py index 150bf04f6..39715a99c 100644 --- a/vsg/vhdlFile/classify/generate_specification.py +++ b/vsg/vhdlFile/classify/generate_specification.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import expression from vsg import decorators +from vsg.vhdlFile.classify import expression @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/generate_statement.py b/vsg/vhdlFile/classify/generate_statement.py index 383591649..a0a587f62 100644 --- a/vsg/vhdlFile/classify/generate_statement.py +++ b/vsg/vhdlFile/classify/generate_statement.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( case_generate_statement, for_generate_statement, if_generate_statement, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/generate_statement_body.py b/vsg/vhdlFile/classify/generate_statement_body.py index 0e7134c0e..589c2b873 100644 --- a/vsg/vhdlFile/classify/generate_statement_body.py +++ b/vsg/vhdlFile/classify/generate_statement_body.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import generate_statement_body as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import block_declarative_part, concurrent_statement -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/generic_clause.py b/vsg/vhdlFile/classify/generic_clause.py index aaf0b337e..e98db41a9 100644 --- a/vsg/vhdlFile/classify/generic_clause.py +++ b/vsg/vhdlFile/classify/generic_clause.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import generic_clause as token from vsg.vhdlFile.classify import generic_list -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/generic_list.py b/vsg/vhdlFile/classify/generic_list.py index 0446204a1..f14de354e 100644 --- a/vsg/vhdlFile/classify/generic_list.py +++ b/vsg/vhdlFile/classify/generic_list.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import interface_list from vsg import decorators +from vsg.vhdlFile.classify import interface_list @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/generic_map_aspect.py b/vsg/vhdlFile/classify/generic_map_aspect.py index f7d1c0303..5d51b696e 100644 --- a/vsg/vhdlFile/classify/generic_map_aspect.py +++ b/vsg/vhdlFile/classify/generic_map_aspect.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import generic_map_aspect as token from vsg.vhdlFile.classify import association_list -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/group_constituent_list.py b/vsg/vhdlFile/classify/group_constituent_list.py index 720ffeb5d..d197c8a2f 100644 --- a/vsg/vhdlFile/classify/group_constituent_list.py +++ b/vsg/vhdlFile/classify/group_constituent_list.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import group_constituent_list as token from vsg.vhdlFile import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/group_declaration.py b/vsg/vhdlFile/classify/group_declaration.py index 1210db936..a266eb468 100644 --- a/vsg/vhdlFile/classify/group_declaration.py +++ b/vsg/vhdlFile/classify/group_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import group_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import group_constituent_list -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/identifier.py b/vsg/vhdlFile/classify/identifier.py index d7fdd742f..45157097f 100644 --- a/vsg/vhdlFile/classify/identifier.py +++ b/vsg/vhdlFile/classify/identifier.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.token import identifier as token from vsg import decorators +from vsg.token import identifier as token @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/identifier_list.py b/vsg/vhdlFile/classify/identifier_list.py index 9028b5f69..c561ae761 100644 --- a/vsg/vhdlFile/classify/identifier_list.py +++ b/vsg/vhdlFile/classify/identifier_list.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.token import identifier_list as token from vsg import decorators +from vsg.token import identifier_list as token @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/if_generate_statement.py b/vsg/vhdlFile/classify/if_generate_statement.py index 3ef47df8e..062a145a6 100644 --- a/vsg/vhdlFile/classify/if_generate_statement.py +++ b/vsg/vhdlFile/classify/if_generate_statement.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import if_generate_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import condition, generate_statement_body -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/if_statement.py b/vsg/vhdlFile/classify/if_statement.py index 3e347a4d8..f0c73f5d5 100644 --- a/vsg/vhdlFile/classify/if_statement.py +++ b/vsg/vhdlFile/classify/if_statement.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import if_statement as token from vsg.vhdlFile.classify import condition, sequence_of_statements, utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/incomplete_type_declaration.py b/vsg/vhdlFile/classify/incomplete_type_declaration.py index 15544e273..9a9802466 100644 --- a/vsg/vhdlFile/classify/incomplete_type_declaration.py +++ b/vsg/vhdlFile/classify/incomplete_type_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import incomplete_type_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/index_constraint.py b/vsg/vhdlFile/classify/index_constraint.py index 52ad12281..d585ba4d9 100644 --- a/vsg/vhdlFile/classify/index_constraint.py +++ b/vsg/vhdlFile/classify/index_constraint.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import index_constraint as token from vsg.vhdlFile.classify import discrete_range -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/index_subtype_definition.py b/vsg/vhdlFile/classify/index_subtype_definition.py index e617b2f56..2d39cb896 100644 --- a/vsg/vhdlFile/classify/index_subtype_definition.py +++ b/vsg/vhdlFile/classify/index_subtype_definition.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import index_subtype_definition as token from vsg.vhdlFile.classify import type_mark -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/instantiated_unit.py b/vsg/vhdlFile/classify/instantiated_unit.py index 9c96bdb5e..8d2d67ea2 100644 --- a/vsg/vhdlFile/classify/instantiated_unit.py +++ b/vsg/vhdlFile/classify/instantiated_unit.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import instantiated_unit as token from vsg.vhdlFile import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/instantiation_list.py b/vsg/vhdlFile/classify/instantiation_list.py index 6e5789f5f..57df6aea7 100644 --- a/vsg/vhdlFile/classify/instantiation_list.py +++ b/vsg/vhdlFile/classify/instantiation_list.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import instantiation_list as token from vsg.vhdlFile import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/integer_type_definition.py b/vsg/vhdlFile/classify/integer_type_definition.py index 03f232efe..c60125a9f 100644 --- a/vsg/vhdlFile/classify/integer_type_definition.py +++ b/vsg/vhdlFile/classify/integer_type_definition.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import range_constraint from vsg import decorators +from vsg.vhdlFile.classify import range_constraint @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_constant_declaration.py b/vsg/vhdlFile/classify/interface_constant_declaration.py index b96e7f50c..033099e9c 100644 --- a/vsg/vhdlFile/classify/interface_constant_declaration.py +++ b/vsg/vhdlFile/classify/interface_constant_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import interface_constant_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, mode, subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_declaration.py b/vsg/vhdlFile/classify/interface_declaration.py index f5cf3cc54..e70d497b4 100644 --- a/vsg/vhdlFile/classify/interface_declaration.py +++ b/vsg/vhdlFile/classify/interface_declaration.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( interface_object_declaration, interface_package_declaration, interface_subprogram_declaration, interface_type_declaration, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) @@ -32,6 +32,8 @@ def detect(oDataStructure): return interface_package_declaration.classify(oDataStructure) return False + + # iCurrent = interface_object_declaration.detect(iToken, lObjects) # if iCurrent != iToken: # return iCurrent diff --git a/vsg/vhdlFile/classify/interface_element.py b/vsg/vhdlFile/classify/interface_element.py index 234475ba2..5930d545d 100644 --- a/vsg/vhdlFile/classify/interface_element.py +++ b/vsg/vhdlFile/classify/interface_element.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import interface_declaration from vsg import decorators +from vsg.vhdlFile.classify import interface_declaration @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_file_declaration.py b/vsg/vhdlFile/classify/interface_file_declaration.py index aee0cfedf..00375488b 100644 --- a/vsg/vhdlFile/classify/interface_file_declaration.py +++ b/vsg/vhdlFile/classify/interface_file_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import interface_file_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier_list, subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_function_specification.py b/vsg/vhdlFile/classify/interface_function_specification.py index 82d2fdf19..aa1364c61 100644 --- a/vsg/vhdlFile/classify/interface_function_specification.py +++ b/vsg/vhdlFile/classify/interface_function_specification.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import interface_function_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import formal_parameter_list, type_mark -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py b/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py index fb1594fe9..ee6fa5e7c 100644 --- a/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py +++ b/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import interface_incomplete_type_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_list.py b/vsg/vhdlFile/classify/interface_list.py index 7bfc18907..8a9c546aa 100644 --- a/vsg/vhdlFile/classify/interface_list.py +++ b/vsg/vhdlFile/classify/interface_list.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import interface_list as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import interface_element -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_object_declaration.py b/vsg/vhdlFile/classify/interface_object_declaration.py index 6cb1348a4..a9242f55c 100644 --- a/vsg/vhdlFile/classify/interface_object_declaration.py +++ b/vsg/vhdlFile/classify/interface_object_declaration.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( interface_constant_declaration, interface_file_declaration, @@ -7,7 +8,6 @@ interface_unknown_declaration, interface_variable_declaration, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) @@ -36,6 +36,8 @@ def detect(oDataStructure): return interface_unknown_declaration.classify(oDataStructure) return False + + # iReturn = interface_constant_declaration.detect(iCurrent, lObjects) # if iReturn != iCurrent: # return iReturn diff --git a/vsg/vhdlFile/classify/interface_package_declaration.py b/vsg/vhdlFile/classify/interface_package_declaration.py index 9f3a76ce6..52ade5204 100644 --- a/vsg/vhdlFile/classify/interface_package_declaration.py +++ b/vsg/vhdlFile/classify/interface_package_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import interface_package_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier, interface_package_generic_map_aspect -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_package_generic_map_aspect.py b/vsg/vhdlFile/classify/interface_package_generic_map_aspect.py index 04a5dd631..4b079e0e9 100644 --- a/vsg/vhdlFile/classify/interface_package_generic_map_aspect.py +++ b/vsg/vhdlFile/classify/interface_package_generic_map_aspect.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import interface_package_generic_map_aspect as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_map_aspect -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_procedure_specification.py b/vsg/vhdlFile/classify/interface_procedure_specification.py index 392144487..ce4672d6f 100644 --- a/vsg/vhdlFile/classify/interface_procedure_specification.py +++ b/vsg/vhdlFile/classify/interface_procedure_specification.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import interface_procedure_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import formal_parameter_list -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_signal_declaration.py b/vsg/vhdlFile/classify/interface_signal_declaration.py index 47f0f8735..262355e2b 100644 --- a/vsg/vhdlFile/classify/interface_signal_declaration.py +++ b/vsg/vhdlFile/classify/interface_signal_declaration.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import interface_signal_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, mode, subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_subprogram_declaration.py b/vsg/vhdlFile/classify/interface_subprogram_declaration.py index 26c604fb9..edb313713 100644 --- a/vsg/vhdlFile/classify/interface_subprogram_declaration.py +++ b/vsg/vhdlFile/classify/interface_subprogram_declaration.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import interface_subprogram_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( interface_subprogram_default, interface_subprogram_specification, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) @@ -15,14 +15,14 @@ def detect(oDataStructure): interface_subprogram_declaration ::= interface_subprogram_specification [ is interface_subprogram_default ] """ -# iCurrent = utils.find_next_token(iToken, lObjects) -# iLast = iCurrent -# iCurrent = interface_subprogram_specification.detect(iCurrent, lObjects) -# if iLast != iCurrent: -# iCurrent = utils.find_next_token(iToken, lObjects) -# if utils.object_value_is(lObjects, iCurrent, "is"): -# return classify(iCurrent, lObjects) -# return iToken + # iCurrent = utils.find_next_token(iToken, lObjects) + # iLast = iCurrent + # iCurrent = interface_subprogram_specification.detect(iCurrent, lObjects) + # if iLast != iCurrent: + # iCurrent = utils.find_next_token(iToken, lObjects) + # if utils.object_value_is(lObjects, iCurrent, "is"): + # return classify(iCurrent, lObjects) + # return iToken if interface_subprogram_specification.detect(oDataStructure): oDataStructure.increment_seek_index() diff --git a/vsg/vhdlFile/classify/interface_subprogram_default.py b/vsg/vhdlFile/classify/interface_subprogram_default.py index 2a3aff335..e3494c4e8 100644 --- a/vsg/vhdlFile/classify/interface_subprogram_default.py +++ b/vsg/vhdlFile/classify/interface_subprogram_default.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import interface_subprogram_default as token from vsg.vhdlFile import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_subprogram_specification.py b/vsg/vhdlFile/classify/interface_subprogram_specification.py index 4389cb39b..f5ee3a88a 100644 --- a/vsg/vhdlFile/classify/interface_subprogram_specification.py +++ b/vsg/vhdlFile/classify/interface_subprogram_specification.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( interface_function_specification, interface_procedure_specification, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) @@ -17,10 +17,10 @@ def detect(oDataStructure): if interface_procedure_specification.detect(oDataStructure): interface_procedure_specification.classify(oDataStructure) - return True + return True if interface_function_specification.detect(oDataStructure): interface_function_specification.classify(oDataStructure) - return True + return True return False diff --git a/vsg/vhdlFile/classify/interface_type_declaration.py b/vsg/vhdlFile/classify/interface_type_declaration.py index e9dc0760c..381711381 100644 --- a/vsg/vhdlFile/classify/interface_type_declaration.py +++ b/vsg/vhdlFile/classify/interface_type_declaration.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import interface_incomplete_type_declaration from vsg import decorators +from vsg.vhdlFile.classify import interface_incomplete_type_declaration @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_unknown_declaration.py b/vsg/vhdlFile/classify/interface_unknown_declaration.py index 611fff9ca..ec884a4ee 100644 --- a/vsg/vhdlFile/classify/interface_unknown_declaration.py +++ b/vsg/vhdlFile/classify/interface_unknown_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import interface_unknown_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, mode, subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/interface_variable_declaration.py b/vsg/vhdlFile/classify/interface_variable_declaration.py index 19bb38a2c..48ccaf26d 100644 --- a/vsg/vhdlFile/classify/interface_variable_declaration.py +++ b/vsg/vhdlFile/classify/interface_variable_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import interface_variable_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, mode, subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/iteration_scheme.py b/vsg/vhdlFile/classify/iteration_scheme.py index b4824423a..7b1424d58 100644 --- a/vsg/vhdlFile/classify/iteration_scheme.py +++ b/vsg/vhdlFile/classify/iteration_scheme.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import iteration_scheme as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import condition, parameter_specification -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/library_clause.py b/vsg/vhdlFile/classify/library_clause.py index 94bebc525..83e2d928e 100644 --- a/vsg/vhdlFile/classify/library_clause.py +++ b/vsg/vhdlFile/classify/library_clause.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import library_clause as token from vsg.vhdlFile.classify import logical_name_list -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/library_unit.py b/vsg/vhdlFile/classify/library_unit.py index 2796d458b..39e3a25a0 100644 --- a/vsg/vhdlFile/classify/library_unit.py +++ b/vsg/vhdlFile/classify/library_unit.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import primary_unit, secondary_unit from vsg import decorators +from vsg.vhdlFile.classify import primary_unit, secondary_unit @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/logical_name_list.py b/vsg/vhdlFile/classify/logical_name_list.py index a0d89aa59..722f8a764 100644 --- a/vsg/vhdlFile/classify/logical_name_list.py +++ b/vsg/vhdlFile/classify/logical_name_list.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.token import logical_name_list as token from vsg import decorators +from vsg.token import logical_name_list as token @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/loop_statement.py b/vsg/vhdlFile/classify/loop_statement.py index 2d35a9dfc..3928aa5ab 100644 --- a/vsg/vhdlFile/classify/loop_statement.py +++ b/vsg/vhdlFile/classify/loop_statement.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import loop_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import iteration_scheme, sequence_of_statements -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/mode.py b/vsg/vhdlFile/classify/mode.py index 3135a7a9f..e02f869b5 100644 --- a/vsg/vhdlFile/classify/mode.py +++ b/vsg/vhdlFile/classify/mode.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import mode as token from vsg.vhdlFile import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/name.py b/vsg/vhdlFile/classify/name.py index 99f322ce1..c39a8e735 100644 --- a/vsg/vhdlFile/classify/name.py +++ b/vsg/vhdlFile/classify/name.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- -from vsg import parser +from vsg import decorators, parser from vsg.token import direction from vsg.vhdlFile.classify import external_name, utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/next_statement.py b/vsg/vhdlFile/classify/next_statement.py index 6e2c5ebf2..c67cf109c 100644 --- a/vsg/vhdlFile/classify/next_statement.py +++ b/vsg/vhdlFile/classify/next_statement.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import next_statement as token from vsg.vhdlFile.classify import condition, utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/null_statement.py b/vsg/vhdlFile/classify/null_statement.py index 9eb34a014..68f4a2a38 100644 --- a/vsg/vhdlFile/classify/null_statement.py +++ b/vsg/vhdlFile/classify/null_statement.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import null_statement as token from vsg.vhdlFile.classify import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/package_body.py b/vsg/vhdlFile/classify/package_body.py index 2f77af9e5..54c9923aa 100644 --- a/vsg/vhdlFile/classify/package_body.py +++ b/vsg/vhdlFile/classify/package_body.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import package_body as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import package_body_declarative_part -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/package_body_declarative_item.py b/vsg/vhdlFile/classify/package_body_declarative_item.py index 13993a504..3859e56a2 100644 --- a/vsg/vhdlFile/classify/package_body_declarative_item.py +++ b/vsg/vhdlFile/classify/package_body_declarative_item.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( alias_declaration, attribute_declaration, @@ -18,7 +19,6 @@ use_clause, variable_declaration, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/package_body_declarative_part.py b/vsg/vhdlFile/classify/package_body_declarative_part.py index 3f8c6e241..c7d3003c0 100644 --- a/vsg/vhdlFile/classify/package_body_declarative_part.py +++ b/vsg/vhdlFile/classify/package_body_declarative_part.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import package_body_declarative_item from vsg import decorators +from vsg.vhdlFile.classify import package_body_declarative_item @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/package_declaration.py b/vsg/vhdlFile/classify/package_declaration.py index c2ee06121..ccdafb77f 100644 --- a/vsg/vhdlFile/classify/package_declaration.py +++ b/vsg/vhdlFile/classify/package_declaration.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import package_declaration as token from vsg.vhdlFile.classify import package_declarative_part, package_header -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/package_declarative_item.py b/vsg/vhdlFile/classify/package_declarative_item.py index 33444eae3..d64ec7863 100644 --- a/vsg/vhdlFile/classify/package_declarative_item.py +++ b/vsg/vhdlFile/classify/package_declarative_item.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( alias_declaration, attribute_declaration, @@ -17,7 +18,6 @@ use_clause, variable_declaration, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/package_declarative_part.py b/vsg/vhdlFile/classify/package_declarative_part.py index 6c9c20205..98d17bd31 100644 --- a/vsg/vhdlFile/classify/package_declarative_part.py +++ b/vsg/vhdlFile/classify/package_declarative_part.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import package_declarative_item from vsg import decorators +from vsg.vhdlFile.classify import package_declarative_item @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/package_header.py b/vsg/vhdlFile/classify/package_header.py index 8e0dbf225..a87fb4c0c 100644 --- a/vsg/vhdlFile/classify/package_header.py +++ b/vsg/vhdlFile/classify/package_header.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import package_header as token from vsg.vhdlFile.classify import generic_clause, generic_map_aspect -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/package_instantiation_declaration.py b/vsg/vhdlFile/classify/package_instantiation_declaration.py index 41abfd425..3bc61ad40 100644 --- a/vsg/vhdlFile/classify/package_instantiation_declaration.py +++ b/vsg/vhdlFile/classify/package_instantiation_declaration.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import package_instantiation_declaration as token from vsg.vhdlFile.classify import generic_map_aspect, identifier -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/parameter_specification.py b/vsg/vhdlFile/classify/parameter_specification.py index 849b13b54..ca6e3ae77 100644 --- a/vsg/vhdlFile/classify/parameter_specification.py +++ b/vsg/vhdlFile/classify/parameter_specification.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import parameter_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import discrete_range -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/physical_type_definition.py b/vsg/vhdlFile/classify/physical_type_definition.py index f7834df57..9ddf5de01 100644 --- a/vsg/vhdlFile/classify/physical_type_definition.py +++ b/vsg/vhdlFile/classify/physical_type_definition.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import physical_type_definition as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( @@ -7,7 +8,6 @@ range_constraint, secondary_unit_declaration, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/port_clause.py b/vsg/vhdlFile/classify/port_clause.py index bf68b53ed..e621a4773 100644 --- a/vsg/vhdlFile/classify/port_clause.py +++ b/vsg/vhdlFile/classify/port_clause.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import port_clause as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import port_list -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/port_list.py b/vsg/vhdlFile/classify/port_list.py index 7f52c9fa3..5587062a7 100644 --- a/vsg/vhdlFile/classify/port_list.py +++ b/vsg/vhdlFile/classify/port_list.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import interface_list from vsg import decorators +from vsg.vhdlFile.classify import interface_list @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/port_map_aspect.py b/vsg/vhdlFile/classify/port_map_aspect.py index bd5c497d9..fb621e393 100644 --- a/vsg/vhdlFile/classify/port_map_aspect.py +++ b/vsg/vhdlFile/classify/port_map_aspect.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import port_map_aspect as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import association_list -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/prefix.py b/vsg/vhdlFile/classify/prefix.py index c0b835172..5b56c29e3 100644 --- a/vsg/vhdlFile/classify/prefix.py +++ b/vsg/vhdlFile/classify/prefix.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- -from vsg import parser +from vsg import decorators, parser from vsg.vhdlFile.classify import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/primary_unit.py b/vsg/vhdlFile/classify/primary_unit.py index 38747c0cb..75415f7a4 100644 --- a/vsg/vhdlFile/classify/primary_unit.py +++ b/vsg/vhdlFile/classify/primary_unit.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( configuration_declaration, context_declaration, @@ -7,7 +8,6 @@ package_declaration, package_instantiation_declaration, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/primary_unit_declaration.py b/vsg/vhdlFile/classify/primary_unit_declaration.py index 4c83d5ba0..31fd23787 100644 --- a/vsg/vhdlFile/classify/primary_unit_declaration.py +++ b/vsg/vhdlFile/classify/primary_unit_declaration.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import primary_unit_declaration as token from vsg.vhdlFile import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/procedure_call.py b/vsg/vhdlFile/classify/procedure_call.py index 76ecf0015..75e49c0a2 100644 --- a/vsg/vhdlFile/classify/procedure_call.py +++ b/vsg/vhdlFile/classify/procedure_call.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import procedure_call as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import actual_parameter_part -from vsg import decorators lExceptions = ["<=", "end", "map", "component", "entity", "configuration", "if"] diff --git a/vsg/vhdlFile/classify/procedure_call_statement.py b/vsg/vhdlFile/classify/procedure_call_statement.py index f9b18ff89..d52f1f591 100644 --- a/vsg/vhdlFile/classify/procedure_call_statement.py +++ b/vsg/vhdlFile/classify/procedure_call_statement.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import procedure_call_statement as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import procedure_call -from vsg import decorators lKeywords = ["null", "return", "exit", "next", "while", "for", "loop", "case", "if", "report", "assert", "wait", "end", "with", "else", "elsif", "when"] diff --git a/vsg/vhdlFile/classify/procedure_specification.py b/vsg/vhdlFile/classify/procedure_specification.py index d27725a19..0e726bc63 100644 --- a/vsg/vhdlFile/classify/procedure_specification.py +++ b/vsg/vhdlFile/classify/procedure_specification.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import procedure_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import formal_parameter_list, subprogram_header -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/process_declarative_item.py b/vsg/vhdlFile/classify/process_declarative_item.py index 530696980..d50283ac0 100644 --- a/vsg/vhdlFile/classify/process_declarative_item.py +++ b/vsg/vhdlFile/classify/process_declarative_item.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( alias_declaration, attribute_declaration, @@ -17,7 +18,6 @@ use_clause, variable_declaration, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/process_declarative_part.py b/vsg/vhdlFile/classify/process_declarative_part.py index c6794f917..c7fe7cc5e 100644 --- a/vsg/vhdlFile/classify/process_declarative_part.py +++ b/vsg/vhdlFile/classify/process_declarative_part.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import process_declarative_item from vsg import decorators +from vsg.vhdlFile.classify import process_declarative_item @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/process_sensitivity_list.py b/vsg/vhdlFile/classify/process_sensitivity_list.py index 903ebb394..43bb6a9ac 100644 --- a/vsg/vhdlFile/classify/process_sensitivity_list.py +++ b/vsg/vhdlFile/classify/process_sensitivity_list.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import process_sensitivity_list as token from vsg.vhdlFile.classify import sensitivity_list -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/process_statement.py b/vsg/vhdlFile/classify/process_statement.py index be40a4dd2..e8dcd4fb3 100644 --- a/vsg/vhdlFile/classify/process_statement.py +++ b/vsg/vhdlFile/classify/process_statement.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import process_statement as token from vsg.vhdlFile.classify import ( process_declarative_part, @@ -7,7 +8,6 @@ process_statement_part, utils, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/process_statement_part.py b/vsg/vhdlFile/classify/process_statement_part.py index 5627f1d51..3daa55377 100644 --- a/vsg/vhdlFile/classify/process_statement_part.py +++ b/vsg/vhdlFile/classify/process_statement_part.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import sequential_statement from vsg import decorators +from vsg.vhdlFile.classify import sequential_statement @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/protected_type_body.py b/vsg/vhdlFile/classify/protected_type_body.py index 0d4884781..e8ad058ec 100644 --- a/vsg/vhdlFile/classify/protected_type_body.py +++ b/vsg/vhdlFile/classify/protected_type_body.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import protected_type_body as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import protected_type_body_declarative_part -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/protected_type_body_declarative_item.py b/vsg/vhdlFile/classify/protected_type_body_declarative_item.py index 3b98c2e7a..a0260b84b 100644 --- a/vsg/vhdlFile/classify/protected_type_body_declarative_item.py +++ b/vsg/vhdlFile/classify/protected_type_body_declarative_item.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( alias_declaration, attribute_declaration, @@ -17,7 +18,6 @@ use_clause, variable_declaration, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/protected_type_body_declarative_part.py b/vsg/vhdlFile/classify/protected_type_body_declarative_part.py index 751bb878c..643314027 100644 --- a/vsg/vhdlFile/classify/protected_type_body_declarative_part.py +++ b/vsg/vhdlFile/classify/protected_type_body_declarative_part.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile import utils from vsg.vhdlFile.classify import protected_type_body_declarative_item -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/protected_type_declaration.py b/vsg/vhdlFile/classify/protected_type_declaration.py index 30f7b89d6..26371bdf9 100644 --- a/vsg/vhdlFile/classify/protected_type_declaration.py +++ b/vsg/vhdlFile/classify/protected_type_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import protected_type_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import protected_type_declarative_part -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/protected_type_declarative_item.py b/vsg/vhdlFile/classify/protected_type_declarative_item.py index 8b045516a..82849ddc9 100644 --- a/vsg/vhdlFile/classify/protected_type_declarative_item.py +++ b/vsg/vhdlFile/classify/protected_type_declarative_item.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( attribute_specification, subprogram_body, @@ -7,7 +8,6 @@ subprogram_instantiation_declaration, use_clause, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/protected_type_declarative_part.py b/vsg/vhdlFile/classify/protected_type_declarative_part.py index 693e56d72..0a6c59776 100644 --- a/vsg/vhdlFile/classify/protected_type_declarative_part.py +++ b/vsg/vhdlFile/classify/protected_type_declarative_part.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile import utils from vsg.vhdlFile.classify import protected_type_declarative_item -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/protected_type_definition.py b/vsg/vhdlFile/classify/protected_type_definition.py index 4234aae5f..99412f1a0 100644 --- a/vsg/vhdlFile/classify/protected_type_definition.py +++ b/vsg/vhdlFile/classify/protected_type_definition.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import protected_type_body, protected_type_declaration from vsg import decorators +from vsg.vhdlFile.classify import protected_type_body, protected_type_declaration @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/range.py b/vsg/vhdlFile/classify/range.py index 51038a6c2..1c06b30fa 100644 --- a/vsg/vhdlFile/classify/range.py +++ b/vsg/vhdlFile/classify/range.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import attribute_name from vsg import decorators +from vsg.vhdlFile.classify import attribute_name @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/range_constraint.py b/vsg/vhdlFile/classify/range_constraint.py index 40b9c7052..996852ab0 100644 --- a/vsg/vhdlFile/classify/range_constraint.py +++ b/vsg/vhdlFile/classify/range_constraint.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- -from vsg import parser +from vsg import decorators, parser from vsg.token import range_constraint as token from vsg.vhdlFile.classify import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/record_constraint.py b/vsg/vhdlFile/classify/record_constraint.py index d91519c58..ed9c1cdea 100644 --- a/vsg/vhdlFile/classify/record_constraint.py +++ b/vsg/vhdlFile/classify/record_constraint.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import record_constraint as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import record_element_constraint -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/record_element_constraint.py b/vsg/vhdlFile/classify/record_element_constraint.py index 33d3fb874..b2fc3e52b 100644 --- a/vsg/vhdlFile/classify/record_element_constraint.py +++ b/vsg/vhdlFile/classify/record_element_constraint.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import record_element_constraint as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import element_constraint -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/record_type_definition.py b/vsg/vhdlFile/classify/record_type_definition.py index e3d22afe6..c885e4558 100644 --- a/vsg/vhdlFile/classify/record_type_definition.py +++ b/vsg/vhdlFile/classify/record_type_definition.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import record_type_definition as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import element_declaration -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/report_statement.py b/vsg/vhdlFile/classify/report_statement.py index 43d1bdc9e..43ba5856f 100644 --- a/vsg/vhdlFile/classify/report_statement.py +++ b/vsg/vhdlFile/classify/report_statement.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import report_statement as token from vsg.vhdlFile.classify import expression, utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/resolution_indication.py b/vsg/vhdlFile/classify/resolution_indication.py index 080f2febd..bdeefea9b 100644 --- a/vsg/vhdlFile/classify/resolution_indication.py +++ b/vsg/vhdlFile/classify/resolution_indication.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- -from vsg import parser +from vsg import decorators, parser from vsg.token import resolution_indication as token from vsg.vhdlFile import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/return_statement.py b/vsg/vhdlFile/classify/return_statement.py index a38aa6fa8..6b06e95c1 100644 --- a/vsg/vhdlFile/classify/return_statement.py +++ b/vsg/vhdlFile/classify/return_statement.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import return_statement as token from vsg.vhdlFile.classify import expression, utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/scalar_type_definition.py b/vsg/vhdlFile/classify/scalar_type_definition.py index 246caf038..551945654 100644 --- a/vsg/vhdlFile/classify/scalar_type_definition.py +++ b/vsg/vhdlFile/classify/scalar_type_definition.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( enumeration_type_definition, integer_type_definition, physical_type_definition, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/secondary_unit.py b/vsg/vhdlFile/classify/secondary_unit.py index d17b62f4e..a318ce4bd 100644 --- a/vsg/vhdlFile/classify/secondary_unit.py +++ b/vsg/vhdlFile/classify/secondary_unit.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import architecture_body, package_body from vsg import decorators +from vsg.vhdlFile.classify import architecture_body, package_body @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/secondary_unit_declaration.py b/vsg/vhdlFile/classify/secondary_unit_declaration.py index 863c5b9da..075686d80 100644 --- a/vsg/vhdlFile/classify/secondary_unit_declaration.py +++ b/vsg/vhdlFile/classify/secondary_unit_declaration.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import secondary_unit_declaration as token from vsg.vhdlFile import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/selected_expressions.py b/vsg/vhdlFile/classify/selected_expressions.py index 7f9a2e7a9..a0ecc0118 100644 --- a/vsg/vhdlFile/classify/selected_expressions.py +++ b/vsg/vhdlFile/classify/selected_expressions.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import selected_expressions as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import choices, expression -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/selected_force_assignment.py b/vsg/vhdlFile/classify/selected_force_assignment.py index 7e043480d..1c0bb5389 100644 --- a/vsg/vhdlFile/classify/selected_force_assignment.py +++ b/vsg/vhdlFile/classify/selected_force_assignment.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import selected_force_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, force_mode, selected_expressions -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/selected_signal_assignment.py b/vsg/vhdlFile/classify/selected_signal_assignment.py index 20ca25f54..eaf1a2396 100644 --- a/vsg/vhdlFile/classify/selected_signal_assignment.py +++ b/vsg/vhdlFile/classify/selected_signal_assignment.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( selected_force_assignment, selected_waveform_assignment, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/selected_variable_assignment.py b/vsg/vhdlFile/classify/selected_variable_assignment.py index 0acc738ad..758d80cbf 100644 --- a/vsg/vhdlFile/classify/selected_variable_assignment.py +++ b/vsg/vhdlFile/classify/selected_variable_assignment.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import selected_variable_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, selected_expressions -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/selected_waveform_assignment.py b/vsg/vhdlFile/classify/selected_waveform_assignment.py index 16caf3c1b..e6b483bd1 100644 --- a/vsg/vhdlFile/classify/selected_waveform_assignment.py +++ b/vsg/vhdlFile/classify/selected_waveform_assignment.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import selected_waveform_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import delay_mechanism, expression, selected_waveforms -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/selected_waveforms.py b/vsg/vhdlFile/classify/selected_waveforms.py index 7d24236f5..b5b5c56f3 100644 --- a/vsg/vhdlFile/classify/selected_waveforms.py +++ b/vsg/vhdlFile/classify/selected_waveforms.py @@ -1,10 +1,9 @@ # -*- coding: utf-8 -*- -from vsg import parser +from vsg import decorators, parser from vsg.token import selected_waveforms as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import choices, waveform -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/sensitivity_clause.py b/vsg/vhdlFile/classify/sensitivity_clause.py index d5d5a5c63..c2d879631 100644 --- a/vsg/vhdlFile/classify/sensitivity_clause.py +++ b/vsg/vhdlFile/classify/sensitivity_clause.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import sensitivity_clause as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import sensitivity_list -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/sensitivity_list.py b/vsg/vhdlFile/classify/sensitivity_list.py index e9e37463c..c51bf8fec 100644 --- a/vsg/vhdlFile/classify/sensitivity_list.py +++ b/vsg/vhdlFile/classify/sensitivity_list.py @@ -1,10 +1,9 @@ # -*- coding: utf-8 -*- import copy -from vsg import parser +from vsg import decorators, parser from vsg.token import sensitivity_list as token from vsg.vhdlFile.classify import name, utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/sequence_of_statements.py b/vsg/vhdlFile/classify/sequence_of_statements.py index d060adebd..1f96300ed 100644 --- a/vsg/vhdlFile/classify/sequence_of_statements.py +++ b/vsg/vhdlFile/classify/sequence_of_statements.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import sequential_statement from vsg import decorators +from vsg.vhdlFile.classify import sequential_statement @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/sequential_statement.py b/vsg/vhdlFile/classify/sequential_statement.py index b40288e4c..0270f4cb8 100644 --- a/vsg/vhdlFile/classify/sequential_statement.py +++ b/vsg/vhdlFile/classify/sequential_statement.py @@ -2,6 +2,7 @@ # from vsg.vhdlFile import utils +from vsg import decorators from vsg.vhdlFile.classify import ( assertion_statement, case_statement, @@ -17,7 +18,6 @@ variable_assignment_statement, wait_statement, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/signal_assignment_statement.py b/vsg/vhdlFile/classify/signal_assignment_statement.py index 809e9a018..36d90a1c8 100644 --- a/vsg/vhdlFile/classify/signal_assignment_statement.py +++ b/vsg/vhdlFile/classify/signal_assignment_statement.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import signal_assignment_statement as token from vsg.vhdlFile.classify import ( conditional_signal_assignment, @@ -7,7 +8,6 @@ simple_signal_assignment, utils, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/signal_declaration.py b/vsg/vhdlFile/classify/signal_declaration.py index 12da83cf7..e16693256 100644 --- a/vsg/vhdlFile/classify/signal_declaration.py +++ b/vsg/vhdlFile/classify/signal_declaration.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import signal_declaration as token from vsg.vhdlFile.classify import ( expression, @@ -7,7 +8,6 @@ signal_kind, subtype_indication, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/signal_kind.py b/vsg/vhdlFile/classify/signal_kind.py index cd0b26742..73c80e12f 100644 --- a/vsg/vhdlFile/classify/signal_kind.py +++ b/vsg/vhdlFile/classify/signal_kind.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.token import signal_kind as token from vsg import decorators +from vsg.token import signal_kind as token @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/signature.py b/vsg/vhdlFile/classify/signature.py index 481008e19..97c2ff912 100644 --- a/vsg/vhdlFile/classify/signature.py +++ b/vsg/vhdlFile/classify/signature.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import signature as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import type_mark -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/simple_configuration_specification.py b/vsg/vhdlFile/classify/simple_configuration_specification.py index b16cf0620..3aa458eb5 100644 --- a/vsg/vhdlFile/classify/simple_configuration_specification.py +++ b/vsg/vhdlFile/classify/simple_configuration_specification.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import simple_configuration_specification as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import binding_indication, component_specification -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/simple_force_assignment.py b/vsg/vhdlFile/classify/simple_force_assignment.py index a5535783b..cf33c789e 100644 --- a/vsg/vhdlFile/classify/simple_force_assignment.py +++ b/vsg/vhdlFile/classify/simple_force_assignment.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import simple_force_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, force_mode -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/simple_release_assignment.py b/vsg/vhdlFile/classify/simple_release_assignment.py index 7b27b8013..3f005ec1a 100644 --- a/vsg/vhdlFile/classify/simple_release_assignment.py +++ b/vsg/vhdlFile/classify/simple_release_assignment.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import simple_release_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import force_mode -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/simple_signal_assignment.py b/vsg/vhdlFile/classify/simple_signal_assignment.py index ce98ae8ec..a24dda622 100644 --- a/vsg/vhdlFile/classify/simple_signal_assignment.py +++ b/vsg/vhdlFile/classify/simple_signal_assignment.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( simple_force_assignment, simple_release_assignment, simple_waveform_assignment, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/simple_variable_assignment.py b/vsg/vhdlFile/classify/simple_variable_assignment.py index fdc941ca0..a2d775f40 100644 --- a/vsg/vhdlFile/classify/simple_variable_assignment.py +++ b/vsg/vhdlFile/classify/simple_variable_assignment.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import simple_variable_assignment as token from vsg.vhdlFile.classify import expression, target -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/simple_waveform_assignment.py b/vsg/vhdlFile/classify/simple_waveform_assignment.py index c6649c387..af1f0aa39 100644 --- a/vsg/vhdlFile/classify/simple_waveform_assignment.py +++ b/vsg/vhdlFile/classify/simple_waveform_assignment.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import simple_waveform_assignment as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import delay_mechanism, waveform -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/subprogram_body.py b/vsg/vhdlFile/classify/subprogram_body.py index 81fab6c65..5ddd122c3 100644 --- a/vsg/vhdlFile/classify/subprogram_body.py +++ b/vsg/vhdlFile/classify/subprogram_body.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import subprogram_body as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( @@ -7,7 +8,6 @@ subprogram_kind, subprogram_statement_part, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/subprogram_declaration.py b/vsg/vhdlFile/classify/subprogram_declaration.py index 3f9dbec64..9245ad32b 100644 --- a/vsg/vhdlFile/classify/subprogram_declaration.py +++ b/vsg/vhdlFile/classify/subprogram_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import subprogram_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import subprogram_specification -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/subprogram_declarative_item.py b/vsg/vhdlFile/classify/subprogram_declarative_item.py index ada66560f..2f9216a01 100644 --- a/vsg/vhdlFile/classify/subprogram_declarative_item.py +++ b/vsg/vhdlFile/classify/subprogram_declarative_item.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( alias_declaration, attribute_declaration, @@ -17,7 +18,6 @@ use_clause, variable_declaration, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/subprogram_declarative_part.py b/vsg/vhdlFile/classify/subprogram_declarative_part.py index 3e0621d43..d77f1647c 100644 --- a/vsg/vhdlFile/classify/subprogram_declarative_part.py +++ b/vsg/vhdlFile/classify/subprogram_declarative_part.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import subprogram_declarative_item from vsg import decorators +from vsg.vhdlFile.classify import subprogram_declarative_item @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/subprogram_header.py b/vsg/vhdlFile/classify/subprogram_header.py index 07afcbf52..655d5cfc8 100644 --- a/vsg/vhdlFile/classify/subprogram_header.py +++ b/vsg/vhdlFile/classify/subprogram_header.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import subprogram_header as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_list, generic_map_aspect -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py b/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py index 215235f7e..fe0a6ce7b 100644 --- a/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py +++ b/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import subprogram_instantiation_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_map_aspect, signature, subprogram_kind -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/subprogram_kind.py b/vsg/vhdlFile/classify/subprogram_kind.py index b8cbf2ed4..c51fb01d8 100644 --- a/vsg/vhdlFile/classify/subprogram_kind.py +++ b/vsg/vhdlFile/classify/subprogram_kind.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import subprogram_kind as token from vsg.vhdlFile import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/subprogram_specification.py b/vsg/vhdlFile/classify/subprogram_specification.py index 045bfdb27..ab3977edd 100644 --- a/vsg/vhdlFile/classify/subprogram_specification.py +++ b/vsg/vhdlFile/classify/subprogram_specification.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import function_specification, procedure_specification from vsg import decorators +from vsg.vhdlFile.classify import function_specification, procedure_specification @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/subprogram_statement_part.py b/vsg/vhdlFile/classify/subprogram_statement_part.py index bf4a1483b..e5dea6958 100644 --- a/vsg/vhdlFile/classify/subprogram_statement_part.py +++ b/vsg/vhdlFile/classify/subprogram_statement_part.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import sequential_statement from vsg import decorators +from vsg.vhdlFile.classify import sequential_statement @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/subtype_declaration.py b/vsg/vhdlFile/classify/subtype_declaration.py index 8041ea9da..e5014f75c 100644 --- a/vsg/vhdlFile/classify/subtype_declaration.py +++ b/vsg/vhdlFile/classify/subtype_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import subtype_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier, subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/subtype_indication.py b/vsg/vhdlFile/classify/subtype_indication.py index 186aba212..b1956f615 100644 --- a/vsg/vhdlFile/classify/subtype_indication.py +++ b/vsg/vhdlFile/classify/subtype_indication.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import constraint, resolution_indication, type_mark from vsg import decorators +from vsg.vhdlFile.classify import constraint, resolution_indication, type_mark @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/target.py b/vsg/vhdlFile/classify/target.py index f36755141..ae777a101 100644 --- a/vsg/vhdlFile/classify/target.py +++ b/vsg/vhdlFile/classify/target.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import aggregate, utils from vsg import decorators +from vsg.vhdlFile.classify import aggregate, utils @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/timeout_clause.py b/vsg/vhdlFile/classify/timeout_clause.py index 0ef6bfdc1..667a354bb 100644 --- a/vsg/vhdlFile/classify/timeout_clause.py +++ b/vsg/vhdlFile/classify/timeout_clause.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import timeout_clause as token from vsg.vhdlFile.classify import expression -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/type_declaration.py b/vsg/vhdlFile/classify/type_declaration.py index d549f078a..d6e3571e4 100644 --- a/vsg/vhdlFile/classify/type_declaration.py +++ b/vsg/vhdlFile/classify/type_declaration.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- -from vsg.vhdlFile.classify import full_type_declaration, incomplete_type_declaration from vsg import decorators +from vsg.vhdlFile.classify import full_type_declaration, incomplete_type_declaration @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/type_definition.py b/vsg/vhdlFile/classify/type_definition.py index e4f684932..8e3715656 100644 --- a/vsg/vhdlFile/classify/type_definition.py +++ b/vsg/vhdlFile/classify/type_definition.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.vhdlFile.classify import ( access_type_definition, composite_type_definition, @@ -7,7 +8,6 @@ protected_type_definition, scalar_type_definition, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/type_mark.py b/vsg/vhdlFile/classify/type_mark.py index a5cd3f5d7..ff5c837f9 100644 --- a/vsg/vhdlFile/classify/type_mark.py +++ b/vsg/vhdlFile/classify/type_mark.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import type_mark as token from vsg.vhdlFile.classify import attribute_name -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/unbounded_array_definition.py b/vsg/vhdlFile/classify/unbounded_array_definition.py index 5bdc4dfd6..997b2c540 100644 --- a/vsg/vhdlFile/classify/unbounded_array_definition.py +++ b/vsg/vhdlFile/classify/unbounded_array_definition.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import unbounded_array_definition as token from vsg.vhdlFile.classify import index_subtype_definition, subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/use_clause.py b/vsg/vhdlFile/classify/use_clause.py index b4a5d77b7..6503cc39b 100644 --- a/vsg/vhdlFile/classify/use_clause.py +++ b/vsg/vhdlFile/classify/use_clause.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import use_clause as token from vsg.vhdlFile.classify import utils -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 280ade296..7492826f6 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -219,8 +219,8 @@ def print_error_message(sToken, token, oDataStructure): sFoundToken = oDataStructure.get_current_token_value() iLine = 0 iColumn = 0 -# iLine = calculate_line_number(iToken, lObjects) -# iColumn = calculate_column(iToken, lObjects) + # iLine = calculate_line_number(iToken, lObjects) + # iColumn = calculate_column(iToken, lObjects) sModuleName = extract_module_name(token) sFileName = oDataStructure.sFilename @@ -237,4 +237,3 @@ def print_error_message(sToken, token, oDataStructure): def extract_module_name(token): return token.__module__.split(".")[-1] - diff --git a/vsg/vhdlFile/classify/variable_assignment_statement.py b/vsg/vhdlFile/classify/variable_assignment_statement.py index e866fea52..9d40e3999 100644 --- a/vsg/vhdlFile/classify/variable_assignment_statement.py +++ b/vsg/vhdlFile/classify/variable_assignment_statement.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import variable_assignment_statement as token from vsg.vhdlFile.classify import ( conditional_variable_assignment, @@ -7,7 +8,6 @@ simple_variable_assignment, utils, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/variable_declaration.py b/vsg/vhdlFile/classify/variable_declaration.py index 629a0976a..f3f0a182e 100644 --- a/vsg/vhdlFile/classify/variable_declaration.py +++ b/vsg/vhdlFile/classify/variable_declaration.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import variable_declaration as token from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, subtype_indication -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/wait_statement.py b/vsg/vhdlFile/classify/wait_statement.py index 411c58812..2355c5dea 100644 --- a/vsg/vhdlFile/classify/wait_statement.py +++ b/vsg/vhdlFile/classify/wait_statement.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import wait_statement as token from vsg.vhdlFile.classify import ( condition_clause, @@ -7,7 +8,6 @@ timeout_clause, utils, ) -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/waveform.py b/vsg/vhdlFile/classify/waveform.py index 640d0a23c..590e9f941 100644 --- a/vsg/vhdlFile/classify/waveform.py +++ b/vsg/vhdlFile/classify/waveform.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- -from vsg import parser +from vsg import decorators, parser from vsg.token import waveform as token from vsg.vhdlFile.classify import waveform_element -from vsg import decorators @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/waveform_element.py b/vsg/vhdlFile/classify/waveform_element.py index 2ff906c81..9bf49929e 100644 --- a/vsg/vhdlFile/classify/waveform_element.py +++ b/vsg/vhdlFile/classify/waveform_element.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- +from vsg import decorators from vsg.token import waveform_element as token from vsg.vhdlFile.classify import expression -from vsg import decorators @decorators.print_classifier_debug_info(__name__) From 04649e32ec9a04a5699422d5fbc977d3300baf52 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 22 Mar 2025 12:00:26 -0500 Subject: [PATCH 039/124] After tests are now passing. --- vsg/data_structure.py | 7 +++- .../concurrent_signal_assignment_statement.py | 7 +++- .../classify/selected_signal_assignment.py | 4 +- .../classify/simple_force_assignment.py | 11 +++-- .../classify/simple_release_assignment.py | 6 +-- .../classify/simple_signal_assignment.py | 33 ++++----------- .../classify/simple_waveform_assignment.py | 41 ++++++++----------- vsg/vhdlFile/classify/utils.py | 12 +++++- 8 files changed, 56 insertions(+), 65 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 4d00ad6b3..68841e175 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -73,7 +73,7 @@ def does_string_exist_before_matching_close_parenthesis(self, sString): def does_string_exist_before_string_honoring_parenthesis_hierarchy(self, sFirst, sSecond): iParen = 0 - for oToken in self.lAllObjects[self.iCurrent : :]: + for oToken in self.lAllObjects[self.iSeek : :]: if oToken.lower_value == sSecond: return False if oToken.lower_value == "(": @@ -82,6 +82,7 @@ def does_string_exist_before_string_honoring_parenthesis_hierarchy(self, sFirst, iParen -= 1 if iParen == 0 and oToken.lower_value == sFirst: return True + return False def does_string_exist_before_seek_index_honoring_parenthesis_hierarchy(self, sString): iParen = 0 @@ -213,3 +214,7 @@ def advance_seek_over_parenthesis(self): self.iSeek += iToken return True return False + + def debug_print(self, iNumTokens): + for oToken in self.lAllObjects[self.iCurrent : self.iSeek + iNumTokens + 1]: + print(oToken.get_value()) diff --git a/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py b/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py index 66b8dd261..2b9924f4f 100644 --- a/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py +++ b/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py @@ -19,19 +19,22 @@ def detect(oDataStructure): | [ label : ] [ postponed ] concurrent_selected_signal_assignment """ + oDataStructure.align_seek_index() if concurrent_selected_signal_assignment.detect(oDataStructure): utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) utils.tokenize_postponed(oDataStructure, token.postponed_keyword) concurrent_selected_signal_assignment.classify(oDataStructure) return True - elif concurrent_conditional_signal_assignment.detect(oDataStructure): + oDataStructure.align_seek_index() + if concurrent_conditional_signal_assignment.detect(oDataStructure): utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) utils.tokenize_postponed(oDataStructure, token.postponed_keyword) concurrent_conditional_signal_assignment.classify(oDataStructure) return True - elif concurrent_simple_signal_assignment.detect(oDataStructure): + oDataStructure.align_seek_index() + if concurrent_simple_signal_assignment.detect(oDataStructure): utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) utils.tokenize_postponed(oDataStructure, token.postponed_keyword) concurrent_simple_signal_assignment.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/selected_signal_assignment.py b/vsg/vhdlFile/classify/selected_signal_assignment.py index eaf1a2396..c9768fec5 100644 --- a/vsg/vhdlFile/classify/selected_signal_assignment.py +++ b/vsg/vhdlFile/classify/selected_signal_assignment.py @@ -17,9 +17,9 @@ def detect(oDataStructure): """ if oDataStructure.does_string_exist_before_string("<=", ";"): - if oDataStructure.doess_string_exist_in_next_n_tokens("with", 3): + if oDataStructure.does_string_exist_in_next_n_tokens("with", 3): return True - if oDataStructure.doess_string_exist_in_next_n_tokens("if", 3): + if oDataStructure.does_string_exist_in_next_n_tokens("if", 3): return True return False diff --git a/vsg/vhdlFile/classify/simple_force_assignment.py b/vsg/vhdlFile/classify/simple_force_assignment.py index cf33c789e..2c5f0fbc9 100644 --- a/vsg/vhdlFile/classify/simple_force_assignment.py +++ b/vsg/vhdlFile/classify/simple_force_assignment.py @@ -7,18 +7,17 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ simple_force_assignment ::= target <= force [ force_mode ] expression ; """ - if utils.is_next_token_one_of(["when", "if", "elsif", "else"], iToken, lObjects): + if oDataStructure.is_next_token_one_of(["when", "if", "elsif", "else"]): return False - if utils.find_in_range("<=", iToken, ";", lObjects): - if utils.find_in_range("force", iToken, ";", lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.does_string_exist_before_string("<=", ";"): + return oDataStructure.does_string_exist_before_string("force", ";") + return False @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/simple_release_assignment.py b/vsg/vhdlFile/classify/simple_release_assignment.py index 3f005ec1a..97b3e3fe5 100644 --- a/vsg/vhdlFile/classify/simple_release_assignment.py +++ b/vsg/vhdlFile/classify/simple_release_assignment.py @@ -7,15 +7,13 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ simple_release_assignment ::= target <= release [ force_mode ] ; """ - if utils.find_in_range("release", iToken, ";", lObjects): - return classify(iToken, lObjects) - return iToken + return oDataStructure.does_string_exist_before_string("release", ";") @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/simple_signal_assignment.py b/vsg/vhdlFile/classify/simple_signal_assignment.py index a24dda622..c09d23a79 100644 --- a/vsg/vhdlFile/classify/simple_signal_assignment.py +++ b/vsg/vhdlFile/classify/simple_signal_assignment.py @@ -18,7 +18,7 @@ def detect(oDataStructure): | simple_release_assignment """ - if oDataStructure.does_string_exist_in_next_n_tokens("if", 3): + if oDataStructure.is_next_token_one_of(["if", "elsif", "else"]): return False if oDataStructure.does_string_exist_before_string("<=", ";"): if oDataStructure.does_string_exist_before_string("with", ";"): @@ -29,28 +29,11 @@ def detect(oDataStructure): return False -# if utils.find_in_next_n_tokens("if", 3, iToken, lObjects): -# return False -# if utils.find_in_range("<=", iToken, ";", lObjects): -# if utils.find_in_range("when", iToken, ";", lObjects): -# return False -# if utils.find_in_range("with", iToken, ";", lObjects): -# return False -# return True -# return False - - @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = iToken - iCurrent = simple_force_assignment.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent - - iCurrent = simple_release_assignment.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent - - iCurrent = simple_waveform_assignment.detect(iToken, lObjects) - - return iCurrent +def classify(oDataStructure): + if simple_force_assignment.detect(oDataStructure): + simple_force_assignment.classify(oDataStructure) + elif simple_release_assignment.detect(oDataStructure): + simple_release_assignment.classify(oDataStructure) + elif simple_waveform_assignment.detect(oDataStructure): + simple_waveform_assignment.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/simple_waveform_assignment.py b/vsg/vhdlFile/classify/simple_waveform_assignment.py index af1f0aa39..2a9f854e3 100644 --- a/vsg/vhdlFile/classify/simple_waveform_assignment.py +++ b/vsg/vhdlFile/classify/simple_waveform_assignment.py @@ -2,51 +2,44 @@ from vsg import decorators from vsg.token import simple_waveform_assignment as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import delay_mechanism, waveform +from vsg.vhdlFile.classify import delay_mechanism, utils, waveform @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ simple_waveform_assignment ::= target <= [ delay_mechanism ] waveform ; """ - if utils.is_next_token_one_of(["when", "if", "elsif", "else"], iToken, lObjects): - return iToken - if is_a_simple_waveform_assignment(iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token_one_of(["when", "if", "elsif", "else"]): + return False + return is_a_simple_waveform_assignment(oDataStructure) @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_tokens_until("<=", token.target, iToken, lObjects) - iCurrent = utils.assign_next_token_required("<=", token.assignment, iCurrent, lObjects) +def classify(oDataStructure): + utils.assign_tokens_until("<=", token.target, oDataStructure) + oDataStructure.replace_next_token_required("<=", token.assignment) - iCurrent = delay_mechanism.detect(iCurrent, lObjects) + delay_mechanism.detect(oDataStructure) - iCurrent = waveform.classify_until([";"], iCurrent, lObjects) + waveform.classify_until([";"], oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) @decorators.print_classifier_debug_info(__name__) -def is_a_simple_waveform_assignment(iToken, lObjects): - if utils.assignment_operator_found(iToken, lObjects): - if force_or_release_keyword_found(iToken, lObjects): +def is_a_simple_waveform_assignment(oDataStructure): + if utils.assignment_operator_found(oDataStructure): + if force_or_release_keyword_found(oDataStructure): return False return True return False @decorators.print_classifier_debug_info(__name__) -def force_or_release_keyword_found(iToken, lObjects): - if utils.find_in_range("force", iToken, ";", lObjects): - return True - if utils.find_in_range("release", iToken, ";", lObjects): +def force_or_release_keyword_found(oDataStructure): + if oDataStructure.does_string_exist_before_string("force", ";"): return True - return False + return oDataStructure.does_string_exist_before_string("release", ";") diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 7492826f6..3f3697171 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -1,7 +1,13 @@ # -*- coding: utf-8 -*- from vsg import exceptions, parser -from vsg.token import choice, direction, element_association, exponent +from vsg.token import ( + choice, + direction, + element_association, + exponent, + relational_operator, +) from vsg.vhdlFile import utils @@ -237,3 +243,7 @@ def print_error_message(sToken, token, oDataStructure): def extract_module_name(token): return token.__module__.split(".")[-1] + + +def assignment_operator_found(oDataStructure): + return oDataStructure.does_string_exist_before_string_honoring_parenthesis_hierarchy("<=", ";") From 5986cf5efe8bbc27eb238f7357c24838fdbdf3fd Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 22 Mar 2025 14:30:49 -0500 Subject: [PATCH 040/124] alias_declaration rules pass. --- vsg/vhdlFile/classify/alias_declaration.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/vsg/vhdlFile/classify/alias_declaration.py b/vsg/vhdlFile/classify/alias_declaration.py index ca6aedc09..d4bf970bb 100644 --- a/vsg/vhdlFile/classify/alias_declaration.py +++ b/vsg/vhdlFile/classify/alias_declaration.py @@ -20,20 +20,19 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("alias", token.alias_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.alias_keyword) - iCurrent = utils.assign_next_token(token.alias_designator, iCurrent, lObjects) + oDataStructure.replace_next_token_with(token.alias_designator) - if utils.is_next_token(":", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) - iCurrent = subtype_indication.classify(iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iCurrent, lObjects) + if oDataStructure.is_next_token(":"): + oDataStructure.replace_next_token_with(token.colon) + subtype_indication.classify(oDataStructure) - iCurrent = name.classify_until([";", "["], iCurrent, lObjects) + oDataStructure.replace_next_token_required("is", token.is_keyword) - iCurrent = signature.detect(iCurrent, lObjects) + name.classify_until([";", "["], oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + signature.detect(oDataStructure) - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) From ada5f3db452db8156b809cf7cd832945aa117326 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 23 Mar 2025 11:32:19 -0500 Subject: [PATCH 041/124] architecture_body tests pass. --- vsg/data_structure.py | 20 +++-- .../component_instantiation_statement.py | 2 +- .../classify/attribute_specification.py | 19 ++-- .../classify/block_declarative_item.py | 3 +- .../classify/component_declaration.py | 37 +++----- .../component_instantiation_statement.py | 28 +++--- .../classify/constrained_array_definition.py | 13 ++- vsg/vhdlFile/classify/constraint.py | 1 + vsg/vhdlFile/classify/entity_designator.py | 9 +- vsg/vhdlFile/classify/entity_name_list.py | 22 ++--- vsg/vhdlFile/classify/entity_specification.py | 11 +-- .../classify/enumeration_type_definition.py | 14 ++- vsg/vhdlFile/classify/file_declaration.py | 17 ++-- vsg/vhdlFile/classify/file_logical_name.py | 6 +- .../classify/file_open_information.py | 25 +++--- vsg/vhdlFile/classify/file_type_definition.py | 9 +- .../classify/formal_parameter_list.py | 4 +- .../classify/function_specification.py | 29 +++---- vsg/vhdlFile/classify/instantiated_unit.py | 65 +++++++------- .../interface_constant_declaration.py | 21 ++--- .../classify/interface_signal_declaration.py | 24 +++--- .../interface_variable_declaration.py | 21 ++--- vsg/vhdlFile/classify/port_clause.py | 2 - vsg/vhdlFile/classify/port_map_aspect.py | 24 +++--- .../classify/procedure_specification.py | 20 ++--- vsg/vhdlFile/classify/protected_type_body.py | 28 +++--- .../protected_type_body_declarative_item.py | 77 +++++++---------- .../protected_type_body_declarative_part.py | 6 +- .../classify/protected_type_declaration.py | 11 +-- .../classify/protected_type_definition.py | 15 ++-- vsg/vhdlFile/classify/range_constraint.py | 4 +- .../classify/record_type_definition.py | 9 +- .../classify/resolution_indication.py | 5 +- vsg/vhdlFile/classify/subprogram_body.py | 23 +++-- .../classify/subprogram_declaration.py | 4 +- .../classify/subprogram_declarative_item.py | 86 +++++++++---------- .../classify/subprogram_declarative_part.py | 10 +-- vsg/vhdlFile/classify/subprogram_header.py | 9 +- vsg/vhdlFile/classify/subprogram_kind.py | 5 +- .../classify/subprogram_statement_part.py | 12 ++- vsg/vhdlFile/classify/subtype_declaration.py | 15 ++-- 41 files changed, 341 insertions(+), 424 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 68841e175..89e1eeab7 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -10,6 +10,7 @@ def New(lAllObjects): class design_file: def __init__(self, lAllObjects): self.lAllObjects = lAllObjects + self.iEndIndex = len(lAllObjects) - 1 self.sFilename = "" self.iCurrent = 0 self.iSeek = 0 @@ -28,7 +29,10 @@ def advance_to_next_token(self): def advance_to_next_seek_token(self): for iIndex, oToken in enumerate(self.lAllObjects[self.iSeek : :]): if type(oToken) == parser.item: - self.iSeek = self.iSeek + iIndex + if self.iSeek > self.iEndIndex: + self.iSeek = self.iEndIndex + else: + self.iSeek = self.iSeek + iIndex return True return False @@ -122,11 +126,15 @@ def get_seek_index(self): def get_seek_token_lower_value(self): return self.lAllObjects[self.iSeek].lower_value + def increment_current_index(self): self.iCurrent += 1 def increment_seek_index(self): - self.iSeek += 1 + if self.iSeek < self.iEndIndex: + self.iSeek += 1 + else: + self.iSeek = self.iEndIndex def is_next_seek_token(self, sString): self.advance_to_next_seek_token() @@ -191,7 +199,7 @@ def seek_to_next_token(self): # jcl - might need to watch out for going past the end of the lAllObjects list if self.iSeek < self.iCurrent: self.iSeek = self.iCurrent - for iIndex, oToken in enumerate(self.lAllObjects[self.iSeek : :]): + for iIndex, oToken in enumerate(self.lAllObjects[self.iSeek::]): if type(oToken) == parser.item: self.iSeek = self.iSeek + iIndex return True @@ -216,5 +224,7 @@ def advance_seek_over_parenthesis(self): return False def debug_print(self, iNumTokens): - for oToken in self.lAllObjects[self.iCurrent : self.iSeek + iNumTokens + 1]: - print(oToken.get_value()) + sOutput = "" + for oToken in self.lAllObjects[self.iCurrent : self.iCurrent + iNumTokens]: + sOutput += oToken.get_value() + print(f'>>[{sOutput}]<<') diff --git a/vsg/token/component_instantiation_statement.py b/vsg/token/component_instantiation_statement.py index f99a45b5c..5b2ad6293 100644 --- a/vsg/token/component_instantiation_statement.py +++ b/vsg/token/component_instantiation_statement.py @@ -17,7 +17,7 @@ class label_colon(parser.label_colon): unique_id = component_instantiation_statement : label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() diff --git a/vsg/vhdlFile/classify/attribute_specification.py b/vsg/vhdlFile/classify/attribute_specification.py index 13d80bc92..611778462 100644 --- a/vsg/vhdlFile/classify/attribute_specification.py +++ b/vsg/vhdlFile/classify/attribute_specification.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import attribute_specification as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_specification, expression @@ -19,17 +18,15 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("attribute", token.attribute_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token(token.attribute_designator, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("of", token.of_keyword, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.attribute_keyword) + oDataStructure.replace_next_token_with(token.attribute_designator) + oDataStructure.replace_next_token_required("of", token.of_keyword) - iCurrent = entity_specification.classify(iCurrent, lObjects) + entity_specification.classify(oDataStructure) - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("is", token.is_keyword) - iCurrent = expression.classify_until([";"], iCurrent, lObjects) + expression.classify_until([";"], oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/block_declarative_item.py b/vsg/vhdlFile/classify/block_declarative_item.py index f4f98b35e..53c87a570 100644 --- a/vsg/vhdlFile/classify/block_declarative_item.py +++ b/vsg/vhdlFile/classify/block_declarative_item.py @@ -54,7 +54,8 @@ def detect(oDataStructure): """ if subprogram_declaration.detect(oDataStructure): - return subprogram_body.detect(iReturn, lObjects) + subprogram_body.detect(oDataStructure) + return True if subprogram_instantiation_declaration.detect(oDataStructure): return True diff --git a/vsg/vhdlFile/classify/component_declaration.py b/vsg/vhdlFile/classify/component_declaration.py index 8ecb61cad..2e01bff8a 100644 --- a/vsg/vhdlFile/classify/component_declaration.py +++ b/vsg/vhdlFile/classify/component_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import component_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_clause, port_clause @@ -23,30 +22,18 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = classify_opening_declaration(iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.component_keyword) + oDataStructure.replace_next_token_with(token.identifier) + oDataStructure.replace_next_token_with_if("is", token.is_keyword) - iCurrent = generic_clause.detect(iCurrent, lObjects) + if generic_clause.detect(oDataStructure): + generic_clause.classify(oDataStructure) - iCurrent = port_clause.detect(iCurrent, lObjects) + if port_clause.detect(oDataStructure): + port_clause.classify(oDataStructure) - iCurrent = classify_closing_declaration(iCurrent, lObjects) - - return iCurrent - - -def classify_opening_declaration(iToken, lObjects): - iCurrent = utils.assign_next_token_required("component", token.component_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token(token.identifier, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if("is", token.is_keyword, iCurrent, lObjects) - - return iCurrent - - -def classify_closing_declaration(iToken, lObjects): - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("component", token.end_component_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.component_simple_name, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_required("component", token.end_component_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.component_simple_name) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/component_instantiation_statement.py b/vsg/vhdlFile/classify/component_instantiation_statement.py index 256e2c5c7..dd05bb796 100644 --- a/vsg/vhdlFile/classify/component_instantiation_statement.py +++ b/vsg/vhdlFile/classify/component_instantiation_statement.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import component_instantiation_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import generic_map_aspect, instantiated_unit, port_map_aspect +from vsg.vhdlFile.classify import generic_map_aspect, instantiated_unit, port_map_aspect, utils @decorators.print_classifier_debug_info(__name__) @@ -15,24 +14,21 @@ def detect(oDataStructure): [ generic_map_aspect ] [ port_map_aspect ] ; """ - oDataStructure.align_seek_index() - oDataStructure.increment_seek_index() - oDataStructure.advance_to_next_seek_token() - if not oDataStructure.seek_token_lower_value_is(":"): - return False - return instantiated_unit.detect(oDataStructure) + if oDataStructure.are_next_consecutive_tokens([None, ":"]): + if instantiated_unit.detect(oDataStructure): + classify(oDataStructure) + return True + return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.instantiation_label, token.label_colon) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.instantiation_label, token.label_colon) - iCurrent = instantiated_unit.classify(iCurrent, lObjects) + instantiated_unit.classify(oDataStructure) - iCurrent = generic_map_aspect.detect(iCurrent, lObjects) + generic_map_aspect.detect(oDataStructure) - iCurrent = port_map_aspect.detect(iCurrent, lObjects) + port_map_aspect.detect(oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/constrained_array_definition.py b/vsg/vhdlFile/classify/constrained_array_definition.py index 38fa7a509..2afc64078 100644 --- a/vsg/vhdlFile/classify/constrained_array_definition.py +++ b/vsg/vhdlFile/classify/constrained_array_definition.py @@ -7,19 +7,16 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ constrained_array_definition ::= array index_constraint of *element*_subtype_indication """ - if utils.is_next_token("array", iToken, lObjects): - if not utils.find_in_next_n_tokens("<>", 5, iToken, lObjects): - return classify(iToken, lObjects) - else: - return iToken - - return iToken + if oDataStructure.is_next_token("array"): + if not oDataStructure.does_string_exist_in_next_n_tokens("<>", 5): + return True + return False @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/constraint.py b/vsg/vhdlFile/classify/constraint.py index 4ba21bddc..e9ea959ba 100644 --- a/vsg/vhdlFile/classify/constraint.py +++ b/vsg/vhdlFile/classify/constraint.py @@ -12,6 +12,7 @@ def detect(oDataStructure): | array_constraint | record_constraint """ + if range_constraint.detect(oDataStructure): return True diff --git a/vsg/vhdlFile/classify/entity_designator.py b/vsg/vhdlFile/classify/entity_designator.py index 8e39ea21c..2f514c1b1 100644 --- a/vsg/vhdlFile/classify/entity_designator.py +++ b/vsg/vhdlFile/classify/entity_designator.py @@ -2,19 +2,16 @@ from vsg import decorators from vsg.token import entity_designator as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import signature @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ entity_designator ::= entity_tag [ signature ] """ - iCurrent = utils.assign_next_token(token.entity_tag, iToken, lObjects) + oDataStructure.replace_next_token_with(token.entity_tag) - iCurrent = signature.detect(iCurrent, lObjects) - - return iCurrent + signature.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/entity_name_list.py b/vsg/vhdlFile/classify/entity_name_list.py index 9e1dde3d8..6267d4e6b 100644 --- a/vsg/vhdlFile/classify/entity_name_list.py +++ b/vsg/vhdlFile/classify/entity_name_list.py @@ -2,12 +2,11 @@ from vsg import decorators from vsg.token import entity_name_list as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_designator @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ entity_name_list ::= entity_designator { , entity_designator } @@ -15,18 +14,15 @@ def classify(iToken, lObjects): | all """ - if utils.is_next_token("others", iToken, lObjects): - return utils.assign_next_token_required("others", token.others_keyword, iToken, lObjects) + if oDataStructure.is_next_token("others"): + oDataStructure.replace_next_token_with(token.others_keyword) - elif utils.is_next_token("all", iToken, lObjects): - return utils.assign_next_token_required("all", token.all_keyword, iToken, lObjects) + elif oDataStructure.is_next_token("all"): + oDataStructure.replace_next_token_with(token.all_keyword) else: - iCurrent = entity_designator.classify(iToken, lObjects) + entity_designator.classify(oDataStructure) - while utils.is_next_token(",", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(",", token.comma, iToken, lObjects) - - entity_designator.classify(iToken, lObjects) - - return iCurrent + while oDataStructure.is_next_token(","): + oDataStructure.replace_next_token_with(token.comma) + entity_designator.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/entity_specification.py b/vsg/vhdlFile/classify/entity_specification.py index b89a9beef..afed0e35b 100644 --- a/vsg/vhdlFile/classify/entity_specification.py +++ b/vsg/vhdlFile/classify/entity_specification.py @@ -2,21 +2,18 @@ from vsg import decorators from vsg.token import entity_specification as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_name_list @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ entity_specification ::= entity_name_list : entity_class """ - iCurrent = entity_name_list.classify(iToken, lObjects) + entity_name_list.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) + oDataStructure.replace_next_token_required(":", token.colon) - iCurrent = utils.assign_next_token(token.entity_class, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_with(token.entity_class) diff --git a/vsg/vhdlFile/classify/enumeration_type_definition.py b/vsg/vhdlFile/classify/enumeration_type_definition.py index 1540dd680..69deec48f 100644 --- a/vsg/vhdlFile/classify/enumeration_type_definition.py +++ b/vsg/vhdlFile/classify/enumeration_type_definition.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import enumeration_type_definition as token -from vsg.vhdlFile import utils @decorators.print_classifier_debug_info(__name__) @@ -18,12 +17,11 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.open_parenthesis) - while not utils.is_next_token(")", iCurrent, lObjects): - iCurrent = utils.assign_next_token_if(",", token.comma, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.enumeration_literal, iCurrent, lObjects) + while not oDataStructure.is_next_token(")"): + oDataStructure.replace_next_token_with_if(",", token.comma) + oDataStructure.replace_next_token_with(token.enumeration_literal) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) - return iCurrent + oDataStructure.replace_next_token_with(token.close_parenthesis) diff --git a/vsg/vhdlFile/classify/file_declaration.py b/vsg/vhdlFile/classify/file_declaration.py index 4eb5c3ee9..d8852fac8 100644 --- a/vsg/vhdlFile/classify/file_declaration.py +++ b/vsg/vhdlFile/classify/file_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import file_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( file_open_information, identifier_list, @@ -24,15 +23,13 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("file", token.file_keyword, iToken, lObjects) - iCurrent = identifier_list.classify_until([":"], iCurrent, lObjects, token.identifier) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.file_keyword) + identifier_list.classify_until([":"], oDataStructure, token.identifier) + oDataStructure.replace_next_token_required(":", token.colon) - iCurrent = subtype_indication.classify(iCurrent, lObjects) + subtype_indication.classify(oDataStructure) - iCurrent = file_open_information.detect(iCurrent, lObjects) + file_open_information.detect(oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/file_logical_name.py b/vsg/vhdlFile/classify/file_logical_name.py index 121562415..b6402a255 100644 --- a/vsg/vhdlFile/classify/file_logical_name.py +++ b/vsg/vhdlFile/classify/file_logical_name.py @@ -5,11 +5,9 @@ @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ file_logical_name ::= *string*_expression """ - iCurrent = expression.classify_until([";"], iToken, lObjects) - - return iCurrent + expression.classify_until([";"], oDataStructure) diff --git a/vsg/vhdlFile/classify/file_open_information.py b/vsg/vhdlFile/classify/file_open_information.py index 96d383164..0aa95a197 100644 --- a/vsg/vhdlFile/classify/file_open_information.py +++ b/vsg/vhdlFile/classify/file_open_information.py @@ -2,32 +2,29 @@ from vsg import decorators from vsg.token import file_open_information as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import file_logical_name @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ file_open_information ::= [ open *file_open_kind*_expression ] is file_logical_name """ - if utils.is_next_token_one_of(["open", "is"], iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token_one_of(["open", "is"]): + classify(oDataStructure) + return True + return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = iToken +def classify(oDataStructure): - if utils.is_next_token("open", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("open", token.open_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.file_open_kind_expression, iCurrent, lObjects) + if oDataStructure.is_next_token("open"): + oDataStructure.replace_next_token_with(token.open_keyword) + oDataStructure.replace_next_token_with(token.file_open_kind_expression) - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("is", token.is_keyword) - iCurrent = file_logical_name.classify(iCurrent, lObjects) - - return iCurrent + file_logical_name.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/file_type_definition.py b/vsg/vhdlFile/classify/file_type_definition.py index 76781187b..00587747e 100644 --- a/vsg/vhdlFile/classify/file_type_definition.py +++ b/vsg/vhdlFile/classify/file_type_definition.py @@ -7,16 +7,17 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ file_type_definition ::= file of type_mark """ - if utils.is_next_token("file", iToken, lObjects): - return classify(iToken, lObjects) + if oDataStructure.is_next_token("file"): + classify(oDataStructure) + return True - return iToken + return False @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/formal_parameter_list.py b/vsg/vhdlFile/classify/formal_parameter_list.py index 1bc65e9b5..fdb7c4690 100644 --- a/vsg/vhdlFile/classify/formal_parameter_list.py +++ b/vsg/vhdlFile/classify/formal_parameter_list.py @@ -5,10 +5,10 @@ @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ formal_parameter_list ::= *parameter*_interface_list """ - return interface_list.classify(iToken, lObjects) + interface_list.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/function_specification.py b/vsg/vhdlFile/classify/function_specification.py index eb8d95142..43ca490f9 100644 --- a/vsg/vhdlFile/classify/function_specification.py +++ b/vsg/vhdlFile/classify/function_specification.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import function_specification as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import formal_parameter_list, subprogram_header, type_mark @@ -23,22 +22,20 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_if("pure", token.pure_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("impure", token.impure_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("function", token.function_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token(token.designator, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with_if("pure", token.pure_keyword) + oDataStructure.replace_next_token_with_if("impure", token.impure_keyword) + oDataStructure.replace_next_token_required("function", token.function_keyword) + oDataStructure.replace_next_token_with(token.designator) - iCurrent = subprogram_header.detect(iCurrent, lObjects) + subprogram_header.detect(oDataStructure) - iCurrent = utils.assign_next_token_if("parameter", token.parameter_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_with_if("parameter", token.parameter_keyword) - if utils.is_next_token("(", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) - iCurrent = formal_parameter_list.classify(iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) + if oDataStructure.is_next_token("("): + oDataStructure.replace_next_token_with(token.open_parenthesis) + formal_parameter_list.classify(oDataStructure) + oDataStructure.replace_next_token_required(")", token.close_parenthesis) - iCurrent = utils.assign_next_token_required("return", token.return_keyword, iToken, lObjects) - iCurrent = type_mark.classify(iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("return", token.return_keyword) + type_mark.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/instantiated_unit.py b/vsg/vhdlFile/classify/instantiated_unit.py index 8d2d67ea2..7df09a098 100644 --- a/vsg/vhdlFile/classify/instantiated_unit.py +++ b/vsg/vhdlFile/classify/instantiated_unit.py @@ -2,68 +2,63 @@ from vsg import decorators from vsg.token import instantiated_unit as token -from vsg.vhdlFile import utils @decorators.print_classifier_debug_info(__name__) -def detect(iCurrent, lObjects): +def detect(oDataStructure): """ instantiated_unit ::= [ component ] component_name | entity entity_name [ ( *architecture*_identifier ) ] | configuration configuration_name """ - iToken = iCurrent - if utils.is_next_token_one_of(["component", "entity", "configuration"], iToken, lObjects): + if oDataStructure.is_next_token_one_of(["component", "entity", "configuration"]): return True - if utils.find_in_next_n_tokens(";", 2, iToken, lObjects): + if oDataStructure.does_string_exist_in_next_n_tokens(";", 2): return True # Check if this is a signal assignment - if utils.find_in_range("<=", iToken, ";", lObjects): + if oDataStructure.does_string_exist_before_string("<=", ";"): return False - if utils.find_in_range("generate", iToken, ";", lObjects): + if oDataStructure.does_string_exist_before_string("generate", ";"): return False return True @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = iToken +def classify(oDataStructure): - if utils.is_next_token("component", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("component", token.component_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.component_name, iCurrent, lObjects) + if oDataStructure.is_next_token("component"): + oDataStructure.replace_next_token_with(token.component_keyword) + oDataStructure.replace_next_token_with(token.component_name) - elif utils.is_next_token("configuration", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("configuration", token.configuration_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.configuration_name, iCurrent, lObjects) + elif oDataStructure.is_next_token("configuration"): + oDataStructure.replace_next_token_with(token.configuration_keyword) + oDataStructure.replace_next_token_with(token.configuration_name) - elif utils.is_next_token("entity", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("entity", token.entity_keyword, iCurrent, lObjects) + elif oDataStructure.is_next_token("entity"): + oDataStructure.replace_next_token_with(token.entity_keyword) - iCurrent = classify_entity_name(iCurrent, lObjects) + classify_entity_name(oDataStructure) - if utils.is_next_token("(", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(")", token.architecture_identifier, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) + if oDataStructure.is_next_token("("): + oDataStructure.replace_next_token_with(token.open_parenthesis) + oDataStructure.replace_next_token_with_if_not(")", token.architecture_identifier) + oDataStructure.replace_next_token_required(")", token.close_parenthesis) else: - iCurrent = utils.assign_next_token(token.component_name, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_with(token.component_name) @decorators.print_classifier_debug_info(__name__) -def classify_entity_name(iToken, lObjects): - iCurrent = utils.find_next_token(iToken, lObjects) - sTokenValue = lObjects[iCurrent].get_value() +def classify_entity_name(oDataStructure): + + oDataStructure.advance_to_next_token() + sTokenValue = oDataStructure.get_current_token_value() if "." in sTokenValue: lTokenValue = sTokenValue.split(".") - lObjects[iCurrent] = token.library_name(lTokenValue[0]) - lObjects.insert(iCurrent + 1, token.dot(".")) - lObjects.insert(iCurrent + 2, token.entity_name(lTokenValue[1])) - iCurrent = iCurrent + 2 + oDataStructure.lAllObjects[oDataStructure.iCurrent] = token.library_name(lTokenValue[0]) + oDataStructure.lAllObjects.insert(oDataStructure.iCurrent + 1, token.dot(".")) + oDataStructure.lAllObjects.insert(oDataStructure.iCurrent + 2, token.entity_name(lTokenValue[1])) + oDataStructure.iCurrent += 2 + oDataStructure.iEndIndex += 2 else: - iCurrent = utils.assign_next_token(token.entity_name, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_with(token.entity_name) diff --git a/vsg/vhdlFile/classify/interface_constant_declaration.py b/vsg/vhdlFile/classify/interface_constant_declaration.py index 033099e9c..47f55d01d 100644 --- a/vsg/vhdlFile/classify/interface_constant_declaration.py +++ b/vsg/vhdlFile/classify/interface_constant_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import interface_constant_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, mode, subtype_indication @@ -17,19 +16,17 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("constant", token.constant_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.constant_keyword) - iCurrent = identifier_list.classify_until([":"], iCurrent, lObjects, token.identifier) + identifier_list.classify_until([":"], oDataStructure, token.identifier) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) + oDataStructure.replace_next_token_required(":", token.colon) - iCurrent = mode.classify(iCurrent, lObjects) + mode.classify(oDataStructure) - iCurrent = subtype_indication.classify(iCurrent, lObjects) + subtype_indication.classify(oDataStructure) - if utils.is_next_token(":=", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(":=", token.assignment, iCurrent, lObjects) - iCurrent = expression.classify_until([";"], iCurrent, lObjects) - - return iCurrent + if oDataStructure.is_next_token(":="): + oDataStructure.replace_next_token_with(token.assignment) + expression.classify_until([";"], oDatStructure) diff --git a/vsg/vhdlFile/classify/interface_signal_declaration.py b/vsg/vhdlFile/classify/interface_signal_declaration.py index 262355e2b..e24c35aea 100644 --- a/vsg/vhdlFile/classify/interface_signal_declaration.py +++ b/vsg/vhdlFile/classify/interface_signal_declaration.py @@ -1,9 +1,7 @@ # -*- coding: utf-8 -*- - from vsg import decorators from vsg.token import interface_signal_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, mode, subtype_indication @@ -18,22 +16,20 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("signal", token.signal_keyword, iToken, lObjects) - - iCurrent = identifier_list.classify_until([":"], iCurrent, lObjects, token.identifier) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.signal_keyword) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) + identifier_list.classify_until([":"], oDataStructure, token.identifier) - iCurrent = mode.classify(iCurrent, lObjects) + oDataStructure.replace_next_token_required(":", token.colon) - iCurrent = subtype_indication.classify(iCurrent, lObjects) + mode.classify(oDataStructure) - iCurrent = utils.assign_next_token_if("bus", token.bus_keyword, iCurrent, lObjects) + subtype_indication.classify(oDataStructure) - if utils.is_next_token(":=", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(":=", token.assignment, iCurrent, lObjects) + oDataStructure.replace_next_token_with_if("bus", token.bus_keyword) - iCurrent = expression.classify_until([";"], iCurrent, lObjects) + if oDataStructure.is_next_token(":="): + oDataStructure.replace_next_token_with(token.assignment) - return iCurrent + expression.classify_until([";"], oDataStructure) diff --git a/vsg/vhdlFile/classify/interface_variable_declaration.py b/vsg/vhdlFile/classify/interface_variable_declaration.py index 48ccaf26d..c6501a1cc 100644 --- a/vsg/vhdlFile/classify/interface_variable_declaration.py +++ b/vsg/vhdlFile/classify/interface_variable_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import interface_variable_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, mode, subtype_indication @@ -17,19 +16,17 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("variable", token.variable_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.variable_keyword) - iCurrent = identifier_list.classify_until([":"], iCurrent, lObjects, token.identifier) + identifier_list.classify_until([":"], oDataStructure, token.identifier) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) + oDataStructure.replace_next_token_required(":", token.colon) - iCurrent = mode.classify(iCurrent, lObjects) + mode.classify(oDataStructure) - iCurrent = subtype_indication.classify(iCurrent, lObjects) + subtype_indication.classify(oDataStructure) - if utils.is_next_token(":=", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(":=", token.assignment, iCurrent, lObjects) - iCurrent = expression.classify_until([";"], iCurrent, lObjects) - - return iCurrent + if oDataStructure.is_next_token(":="): + oDataStructure.replace_next_token_with(token.assignment) + expression.classify_until([";"], oDataStructure) diff --git a/vsg/vhdlFile/classify/port_clause.py b/vsg/vhdlFile/classify/port_clause.py index e621a4773..6d3030bee 100644 --- a/vsg/vhdlFile/classify/port_clause.py +++ b/vsg/vhdlFile/classify/port_clause.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import port_clause as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import port_list @@ -12,7 +11,6 @@ def detect(oDataStructure): port_clause ::= port ( port_list ) ; """ - return oDataStructure.are_next_consecutive_tokens(["port", "("]) diff --git a/vsg/vhdlFile/classify/port_map_aspect.py b/vsg/vhdlFile/classify/port_map_aspect.py index fb621e393..0354235e6 100644 --- a/vsg/vhdlFile/classify/port_map_aspect.py +++ b/vsg/vhdlFile/classify/port_map_aspect.py @@ -2,30 +2,28 @@ from vsg import decorators from vsg.token import port_map_aspect as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import association_list @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ port_map_aspect ::= port map ( *port*_association_list ) """ - if utils.are_next_consecutive_tokens(["port", "map", "("], iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.are_next_consecutive_tokens(["port", "map", "("]): + classify(oDataStructure) + return True + return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("port", token.port_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("map", token.map_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.port_keyword) + oDataStructure.replace_next_token_with(token.map_keyword) + oDataStructure.replace_next_token_with(token.open_parenthesis) - iCurrent = association_list.classify(iCurrent, lObjects) + association_list.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(")", token.close_parenthesis) diff --git a/vsg/vhdlFile/classify/procedure_specification.py b/vsg/vhdlFile/classify/procedure_specification.py index 0e726bc63..218ce5c2b 100644 --- a/vsg/vhdlFile/classify/procedure_specification.py +++ b/vsg/vhdlFile/classify/procedure_specification.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import procedure_specification as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import formal_parameter_list, subprogram_header @@ -23,16 +22,15 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("procedure", token.procedure_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token(token.designator, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.procedure_keyword) + oDataStructure.replace_next_token_with(token.designator) - iCurrent = subprogram_header.detect(iCurrent, lObjects) + subprogram_header.detect(oDataStructure) - iCurrent = utils.assign_next_token_if("parameter", token.parameter_keyword, iCurrent, lObjects) - if utils.is_next_token("(", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) - iCurrent = formal_parameter_list.classify(iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) + oDataStructure.replace_next_token_with_if("parameter", token.parameter_keyword) - return iCurrent + if oDataStructure.is_next_token("("): + oDataStructure.replace_next_token_with(token.open_parenthesis) + formal_parameter_list.classify(oDataStructure) + oDataStructure.replace_next_token_required(")", token.close_parenthesis) diff --git a/vsg/vhdlFile/classify/protected_type_body.py b/vsg/vhdlFile/classify/protected_type_body.py index e8ad058ec..0d4a0581d 100644 --- a/vsg/vhdlFile/classify/protected_type_body.py +++ b/vsg/vhdlFile/classify/protected_type_body.py @@ -2,12 +2,11 @@ from vsg import decorators from vsg.token import protected_type_body as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import protected_type_body_declarative_part @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ protected_type_body ::= **protected** **body** @@ -15,21 +14,20 @@ def detect(iToken, lObjects): **end** **protected** **body** [ protected_type_simple_name ] """ - if utils.are_next_consecutive_tokens(["protected", "body"], iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.are_next_consecutive_tokens(["protected", "body"]): + classify(oDataStructure) + return True + return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("protected", token.protected_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("body", token.body_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.protected_keyword) + oDataStructure.replace_next_token_with(token.body_keyword) - iCurrent = protected_type_body_declarative_part.detect(iCurrent, lObjects) + protected_type_body_declarative_part.detect(oDataStructure) - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("protected", token.end_protected_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("body", token.end_body_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.protected_type_simple_name, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_required("protected", token.end_protected_keyword) + oDataStructure.replace_next_token_required("body", token.end_body_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.protected_type_simple_name) diff --git a/vsg/vhdlFile/classify/protected_type_body_declarative_item.py b/vsg/vhdlFile/classify/protected_type_body_declarative_item.py index a0260b84b..ed95d16c7 100644 --- a/vsg/vhdlFile/classify/protected_type_body_declarative_item.py +++ b/vsg/vhdlFile/classify/protected_type_body_declarative_item.py @@ -21,7 +21,7 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ protected_type_body_declarative_item ::= subprogram_declaration @@ -43,61 +43,48 @@ def detect(iToken, lObjects): | group_declaration """ - iReturn = subprogram_declaration.detect(iToken, lObjects) - if iReturn != iToken: - iReturn = subprogram_body.detect(iReturn, lObjects) - return iReturn + if subprogram_declaration.detect(oDataStructure): + if subprogram_body.detect(iReturn, lObjects): + return True + return True - iReturn = subprogram_instantiation_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if subprogram_instantiation_declaration.detect(oDataStructure): + return True - iReturn = package_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_declaration.detect(oDataStructure): + return True - iReturn = package_body.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_body.detect(oDataStructure): + return True - iReturn = package_instantiation_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_instantiation_declaration.detect(oDataStructure): + return True - iReturn = type_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if type_declaration.detect(oDataStructure): + return True - iReturn = subtype_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if subtype_declaration.detect(oDataStructure): + return True - iReturn = constant_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if constant_declaration.detect(oDataStructure): + return True - iReturn = variable_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if variable_declaration.detect(oDataStructure): + return True - iReturn = file_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if file_declaration.detect(oDataStructure): + return True - iReturn = alias_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if alias_declaration.detect(oDataStructure): + return True - iReturn = attribute_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if attribute_declaration.detect(oDataStructure): + return True - iReturn = attribute_specification.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if attribute_specification.detect(oDataStructure): + return True - iReturn = use_clause.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if use_clause.detect(oDataStructure): + return True - return iToken + return False diff --git a/vsg/vhdlFile/classify/protected_type_body_declarative_part.py b/vsg/vhdlFile/classify/protected_type_body_declarative_part.py index 643314027..ca879ad5a 100644 --- a/vsg/vhdlFile/classify/protected_type_body_declarative_part.py +++ b/vsg/vhdlFile/classify/protected_type_body_declarative_part.py @@ -1,15 +1,15 @@ # -*- coding: utf-8 -*- from vsg import decorators -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import protected_type_body_declarative_item @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ protected_type_body_declarative_part ::= { protected_type_body_declarative_item } """ - return utils.detect_submodule(iToken, lObjects, protected_type_body_declarative_item) + while protected_type_body_declarative_item.detect(oDataStructure): + pass diff --git a/vsg/vhdlFile/classify/protected_type_declaration.py b/vsg/vhdlFile/classify/protected_type_declaration.py index 26371bdf9..e421deae6 100644 --- a/vsg/vhdlFile/classify/protected_type_declaration.py +++ b/vsg/vhdlFile/classify/protected_type_declaration.py @@ -7,7 +7,7 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ protected_type_declaration ::= **protected** @@ -15,10 +15,11 @@ def detect(iToken, lObjects): **end** **protected** [ protected_type_simple_name ] """ - if utils.is_next_token("protected", iToken, lObjects): - if not utils.are_next_consecutive_tokens(["protected", "body"], iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token("protected"): + if not oDataStructure.are_next_consecutive_tokens(["protected", "body"]): + classify(oDataStructure) + return True + return False @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/protected_type_definition.py b/vsg/vhdlFile/classify/protected_type_definition.py index 99412f1a0..2085c7844 100644 --- a/vsg/vhdlFile/classify/protected_type_definition.py +++ b/vsg/vhdlFile/classify/protected_type_definition.py @@ -5,19 +5,18 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ protected_type_definition ::= protected_type_declaration | protected_type_body """ - iReturn = protected_type_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if protected_type_declaration.detect(oDataStructure): + protected_type_declaration.classify(oDataStructure) + return True - iReturn = protected_type_body.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if protected_type_body.detect(oDataStructure): + return True - return iToken + return False diff --git a/vsg/vhdlFile/classify/range_constraint.py b/vsg/vhdlFile/classify/range_constraint.py index 996852ab0..9bdf8e0dc 100644 --- a/vsg/vhdlFile/classify/range_constraint.py +++ b/vsg/vhdlFile/classify/range_constraint.py @@ -21,10 +21,10 @@ def detect(oDataStructure): def classify(oDataStructure): oDataStructure.replace_next_token_with(token.range_keyword) + # TODO: Refactor the following into the data structure iParenCnt = 0 while not oDataStructure.is_next_token_one_of([";", "units", ":="]): iParenCnt = utils.update_paren_counter(iParenCnt, oDataStructure) if iParenCnt == -1: break - oDataStructure.replace_next_token_with(parser.todo) - oDataStructure.increment_current_index() + oDataStructure.replace_current_token_with(parser.todo) diff --git a/vsg/vhdlFile/classify/record_type_definition.py b/vsg/vhdlFile/classify/record_type_definition.py index c885e4558..8d5a4275a 100644 --- a/vsg/vhdlFile/classify/record_type_definition.py +++ b/vsg/vhdlFile/classify/record_type_definition.py @@ -7,7 +7,7 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ record_type_definition ::= record @@ -16,10 +16,11 @@ def detect(iToken, lObjects): end record [ *record_type*_simple_name ] """ - if utils.is_next_token("record", iToken, lObjects): - return classify(iToken, lObjects) + if oDataStructure.is_next_token("record"): + classify(iToken, lObjects) + return True - return iToken + return False @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/resolution_indication.py b/vsg/vhdlFile/classify/resolution_indication.py index bdeefea9b..e4f5c9b17 100644 --- a/vsg/vhdlFile/classify/resolution_indication.py +++ b/vsg/vhdlFile/classify/resolution_indication.py @@ -32,12 +32,13 @@ def classify_element_resolution(iToken, lObjects): @decorators.print_classifier_debug_info(__name__) -def classify_resolution_function_name(iToken, lObjects): - return utils.assign_next_token(token.resolution_function_name, iToken, lObjects) +def classify_resolution_function_name(oDataStructure): + oDataStructure.replace_next_token_with(token.resolution_function_name) @decorators.print_classifier_debug_info(__name__) def detect_element_resolution(oDataStructure): + # TODO: Can this be is_next_token instead of is_next_seek_token? if oDataStructure.is_next_seek_token("("): return True return False diff --git a/vsg/vhdlFile/classify/subprogram_body.py b/vsg/vhdlFile/classify/subprogram_body.py index 5ddd122c3..694738c12 100644 --- a/vsg/vhdlFile/classify/subprogram_body.py +++ b/vsg/vhdlFile/classify/subprogram_body.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import subprogram_body as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( subprogram_declarative_part, subprogram_kind, @@ -28,21 +27,19 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.is_keyword) - iCurrent = subprogram_declarative_part.detect(iCurrent, lObjects) + subprogram_declarative_part.detect(oDataStructure) - iCurrent = utils.assign_next_token_required("begin", token.begin_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("begin", token.begin_keyword) - iCurrent = subprogram_statement_part.detect(iCurrent, lObjects) + subprogram_statement_part.detect(oDataStructure) - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("end", token.end_keyword) - if subprogram_kind.detect(iCurrent, lObjects): - iCurrent = subprogram_kind.classify(iCurrent, lObjects) + if subprogram_kind.detect(oDataStructure): + subprogram_kind.classify(oDataStructure) - iCurrent = utils.assign_next_token_if_not(";", token.designator, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_with_if_not(";", token.designator) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/subprogram_declaration.py b/vsg/vhdlFile/classify/subprogram_declaration.py index 9245ad32b..d91696eed 100644 --- a/vsg/vhdlFile/classify/subprogram_declaration.py +++ b/vsg/vhdlFile/classify/subprogram_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import subprogram_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import subprogram_specification @@ -14,6 +13,7 @@ def detect(oDataStructure): """ if subprogram_specification.detect(oDataStructure): - oDataStructure.replace_next_token_required(";", token.semicolon) + if oDataStructure.is_next_token(";"): + oDataStructure.replace_next_token_with(token.semicolon) return True return False diff --git a/vsg/vhdlFile/classify/subprogram_declarative_item.py b/vsg/vhdlFile/classify/subprogram_declarative_item.py index 2f9216a01..f56c55436 100644 --- a/vsg/vhdlFile/classify/subprogram_declarative_item.py +++ b/vsg/vhdlFile/classify/subprogram_declarative_item.py @@ -21,7 +21,7 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ subprogram_declarative_item ::= subprogram_declaration @@ -43,61 +43,57 @@ def detect(iToken, lObjects): | group_declaration """ - iReturn = subprogram_declaration.detect(iToken, lObjects) - if iReturn != iToken: - iReturn = subprogram_body.detect(iReturn, lObjects) - return iReturn + if subprogram_declaration.detect(oDataStructure): + if subprogram_body.detect(oDataStructure): + subprogram_body.classify(oDataStructure) + return True - iReturn = subprogram_instantiation_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if subprogram_instantiation_declaration.detect(oDataStructure): + subprogram_instantiation_declaration.classify(oDataStructure) + return True - iReturn = package_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_declaration.detect(oDataStructure): + package_declaration.classify(oDataStructure) + return True - iReturn = package_body.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_body.detect(oDataStructure): + package_body.classify(oDataStructure) + return True - iReturn = package_instantiation_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if package_instantiation_declaration.detect(oDataStructure): + package_instantiation_declaration.classify(oDataStructure) + return True - iReturn = type_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if type_declaration.detect(oDataStructure): + return True - iReturn = subtype_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if subtype_declaration.detect(oDataStructure): + subtype_declaration.classify(oDataStructure) + return True - iReturn = constant_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if constant_declaration.detect(oDataStructure): + return True - iReturn = variable_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if variable_declaration.detect(oDataStructure): + return True - iReturn = file_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if file_declaration.detect(oDataStructure): + return True - iReturn = alias_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if alias_declaration.detect(oDataStructure): + alias_declaration.classify(oDataStructure) + return True - iReturn = attribute_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if attribute_declaration.detect(oDataStructure): + attribute_declaration.classify(oDataStructure) + return True - iReturn = attribute_specification.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if attribute_specification.detect(oDataStructure): + attribute_specification.classify(oDataStructure) + return True - iReturn = use_clause.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if use_clause.detect(oDataStructure): + use_clause.classify(oDataStructure) + return True - return iToken + return False diff --git a/vsg/vhdlFile/classify/subprogram_declarative_part.py b/vsg/vhdlFile/classify/subprogram_declarative_part.py index d77f1647c..5eb8b60f2 100644 --- a/vsg/vhdlFile/classify/subprogram_declarative_part.py +++ b/vsg/vhdlFile/classify/subprogram_declarative_part.py @@ -5,15 +5,11 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ subprogram_declarative_part ::= { subprogram_declarative_item } """ - iLast = 0 - iCurrent = iToken - while iLast != iCurrent: - iLast = iCurrent - iCurrent = subprogram_declarative_item.detect(iCurrent, lObjects) - return iCurrent + while subprogram_declarative_item.detect(oDataStructure): + pass diff --git a/vsg/vhdlFile/classify/subprogram_header.py b/vsg/vhdlFile/classify/subprogram_header.py index 655d5cfc8..fc6e22e2e 100644 --- a/vsg/vhdlFile/classify/subprogram_header.py +++ b/vsg/vhdlFile/classify/subprogram_header.py @@ -7,16 +7,17 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ subprogram_header ::= [ generic ( generic_list ) [ generic_map_aspect ] ] """ - if utils.is_next_token("generic", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token("generic"): + classify(iToken, lObjects) + return True + return False @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/subprogram_kind.py b/vsg/vhdlFile/classify/subprogram_kind.py index c51fb01d8..c854f7076 100644 --- a/vsg/vhdlFile/classify/subprogram_kind.py +++ b/vsg/vhdlFile/classify/subprogram_kind.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import subprogram_kind as token -from vsg.vhdlFile import utils @decorators.print_classifier_debug_info(__name__) @@ -21,5 +20,5 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): - oDataStructure.replace_next_token_if("procedure", token.procedure_keyword) - oDataStructure.replace_next_token_if("function", token.function_keyword) + oDataStructure.replace_next_token_with_if("procedure", token.procedure_keyword) + oDataStructure.replace_next_token_with_if("function", token.function_keyword) diff --git a/vsg/vhdlFile/classify/subprogram_statement_part.py b/vsg/vhdlFile/classify/subprogram_statement_part.py index e5dea6958..ac2a97eac 100644 --- a/vsg/vhdlFile/classify/subprogram_statement_part.py +++ b/vsg/vhdlFile/classify/subprogram_statement_part.py @@ -5,15 +5,13 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ subprogram_statement_part ::= { sequential_statement } """ - iLast = 0 - iCurrent = iToken - while iLast != iCurrent: - iLast = iCurrent - iCurrent = sequential_statement.detect(iCurrent, lObjects) - return iCurrent + while sequential_statement.detect(oDataStructure): + pass + + return False diff --git a/vsg/vhdlFile/classify/subtype_declaration.py b/vsg/vhdlFile/classify/subtype_declaration.py index e5014f75c..f13dedcdb 100644 --- a/vsg/vhdlFile/classify/subtype_declaration.py +++ b/vsg/vhdlFile/classify/subtype_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import subtype_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier, subtype_indication @@ -20,15 +19,13 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("subtype", token.subtype_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("subtype", token.subtype_keyword) - iCurrent = identifier.classify(iCurrent, lObjects, token.identifier) + identifier.classify(oDataStructure, token.identifier) - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("is", token.is_keyword) - iCurrent = subtype_indication.classify(iCurrent, lObjects) + subtype_indication.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) From ea448d4e805e29d2f0643942544812861a4a5d6d Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 23 Mar 2025 14:58:54 -0500 Subject: [PATCH 042/124] array_constraint rules pass. --- vsg/data_structure.py | 11 ++++++++--- vsg/vhdlFile/classify/array_constraint.py | 2 ++ vsg/vhdlFile/classify/range.py | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 89e1eeab7..770f18dc7 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -126,7 +126,6 @@ def get_seek_index(self): def get_seek_token_lower_value(self): return self.lAllObjects[self.iSeek].lower_value - def increment_current_index(self): self.iCurrent += 1 @@ -199,7 +198,7 @@ def seek_to_next_token(self): # jcl - might need to watch out for going past the end of the lAllObjects list if self.iSeek < self.iCurrent: self.iSeek = self.iCurrent - for iIndex, oToken in enumerate(self.lAllObjects[self.iSeek::]): + for iIndex, oToken in enumerate(self.lAllObjects[self.iSeek : :]): if type(oToken) == parser.item: self.iSeek = self.iSeek + iIndex return True @@ -227,4 +226,10 @@ def debug_print(self, iNumTokens): sOutput = "" for oToken in self.lAllObjects[self.iCurrent : self.iCurrent + iNumTokens]: sOutput += oToken.get_value() - print(f'>>[{sOutput}]<<') + print(f">>Current[{sOutput}]<<") + + def debug_seek_print(self, iNumTokens): + sOutput = "" + for oToken in self.lAllObjects[self.iSeek : self.iSeek + iNumTokens]: + sOutput += oToken.get_value() + print(f">>Seek[{sOutput}]<<") diff --git a/vsg/vhdlFile/classify/array_constraint.py b/vsg/vhdlFile/classify/array_constraint.py index 615402e90..2bfd45806 100644 --- a/vsg/vhdlFile/classify/array_constraint.py +++ b/vsg/vhdlFile/classify/array_constraint.py @@ -41,3 +41,5 @@ def classify_open(oDataStructure): oDataStructure.replace_next_token_with(token.open_parenthesis) oDataStructure.replace_next_token_with(token.open_keyword) oDataStructure.replace_next_token_required(")", token.close_parenthesis) + + array_element_constraint.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/range.py b/vsg/vhdlFile/classify/range.py index 1c06b30fa..425665035 100644 --- a/vsg/vhdlFile/classify/range.py +++ b/vsg/vhdlFile/classify/range.py @@ -11,6 +11,8 @@ def detect(oDataStructure): *range*_attribute_name | simple_expression direction simple_expression """ + if oDataStructure.are_next_consecutive_tokens(["(", None, ")"]): + return True if attribute_name.detect(oDataStructure): return True return detect_direction(oDataStructure) From 3768185785dfdfd774544331493342738401627c Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 23 Mar 2025 14:59:52 -0500 Subject: [PATCH 043/124] Running style checks. --- vsg/vhdlFile/classify/component_instantiation_statement.py | 7 ++++++- vsg/vhdlFile/classify/file_open_information.py | 1 - vsg/vhdlFile/classify/instantiated_unit.py | 2 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/vsg/vhdlFile/classify/component_instantiation_statement.py b/vsg/vhdlFile/classify/component_instantiation_statement.py index dd05bb796..63075950e 100644 --- a/vsg/vhdlFile/classify/component_instantiation_statement.py +++ b/vsg/vhdlFile/classify/component_instantiation_statement.py @@ -2,7 +2,12 @@ from vsg import decorators from vsg.token import component_instantiation_statement as token -from vsg.vhdlFile.classify import generic_map_aspect, instantiated_unit, port_map_aspect, utils +from vsg.vhdlFile.classify import ( + generic_map_aspect, + instantiated_unit, + port_map_aspect, + utils, +) @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/file_open_information.py b/vsg/vhdlFile/classify/file_open_information.py index 0aa95a197..6d3abc8c3 100644 --- a/vsg/vhdlFile/classify/file_open_information.py +++ b/vsg/vhdlFile/classify/file_open_information.py @@ -20,7 +20,6 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): - if oDataStructure.is_next_token("open"): oDataStructure.replace_next_token_with(token.open_keyword) oDataStructure.replace_next_token_with(token.file_open_kind_expression) diff --git a/vsg/vhdlFile/classify/instantiated_unit.py b/vsg/vhdlFile/classify/instantiated_unit.py index 7df09a098..0c6d8a535 100644 --- a/vsg/vhdlFile/classify/instantiated_unit.py +++ b/vsg/vhdlFile/classify/instantiated_unit.py @@ -26,7 +26,6 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): - if oDataStructure.is_next_token("component"): oDataStructure.replace_next_token_with(token.component_keyword) oDataStructure.replace_next_token_with(token.component_name) @@ -50,7 +49,6 @@ def classify(oDataStructure): @decorators.print_classifier_debug_info(__name__) def classify_entity_name(oDataStructure): - oDataStructure.advance_to_next_token() sTokenValue = oDataStructure.get_current_token_value() if "." in sTokenValue: From 03891694560555f7721cb2ba65e36d361d6cb75e Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 23 Mar 2025 15:54:07 -0500 Subject: [PATCH 044/124] assert_statement rules passing. --- vsg/token/assertion_statement.py | 2 +- vsg/vhdlFile/classify/assertion.py | 21 +++++------- vsg/vhdlFile/classify/assertion_statement.py | 10 +++--- .../concurrent_assertion_statement.py | 15 ++++---- vsg/vhdlFile/classify/if_statement.py | 24 +++++++++---- vsg/vhdlFile/classify/procedure_call.py | 14 ++++---- .../classify/procedure_call_statement.py | 34 +++---------------- .../classify/sequence_of_statements.py | 6 ++-- 8 files changed, 51 insertions(+), 75 deletions(-) diff --git a/vsg/token/assertion_statement.py b/vsg/token/assertion_statement.py index 026b0f97d..dfa497e41 100644 --- a/vsg/token/assertion_statement.py +++ b/vsg/token/assertion_statement.py @@ -17,7 +17,7 @@ class label_colon(parser.label_colon): unique_id = assertion_statement : label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() diff --git a/vsg/vhdlFile/classify/assertion.py b/vsg/vhdlFile/classify/assertion.py index f31a13fae..daa1a5706 100644 --- a/vsg/vhdlFile/classify/assertion.py +++ b/vsg/vhdlFile/classify/assertion.py @@ -2,12 +2,11 @@ from vsg import decorators from vsg.token import assertion as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import condition, expression @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ assertion ::= assert condition @@ -17,16 +16,14 @@ def classify(iToken, lObjects): The key to detecting this is looking for the keyword **assert** before a semicolon. """ - iCurrent = utils.assign_next_token_required("assert", token.keyword, iToken, lObjects) + oDataStructure.replace_next_token_required("assert", token.keyword) - iCurrent = condition.classify_until(["report", "severity", ";"], iCurrent, lObjects) + condition.classify_until(["report", "severity", ";"], oDataStructure) - if utils.is_next_token("report", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("report", token.report_keyword, iCurrent, lObjects) - iCurrent = expression.classify_until(["severity", ";"], iCurrent, lObjects) + if oDataStructure.is_next_token("report"): + oDataStructure.replace_next_token_with(token.report_keyword) + expression.classify_until(["severity", ";"], oDataStructure) - if utils.is_next_token("severity", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("severity", token.severity_keyword, iCurrent, lObjects) - iCurrent = expression.classify_until([";"], iCurrent, lObjects) - - return iCurrent + if oDataStructure.is_next_token("severity"): + oDataStructure.replace_next_token_with(token.severity_keyword) + expression.classify_until([";"], oDataStructure) diff --git a/vsg/vhdlFile/classify/assertion_statement.py b/vsg/vhdlFile/classify/assertion_statement.py index cbd478bf5..4db487990 100644 --- a/vsg/vhdlFile/classify/assertion_statement.py +++ b/vsg/vhdlFile/classify/assertion_statement.py @@ -18,11 +18,9 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.label, token.label_colon) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.label, token.label_colon) - iCurrent = assertion.classify(iCurrent, lObjects) + assertion.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/concurrent_assertion_statement.py b/vsg/vhdlFile/classify/concurrent_assertion_statement.py index 7613e2cbb..1ce222e45 100644 --- a/vsg/vhdlFile/classify/concurrent_assertion_statement.py +++ b/vsg/vhdlFile/classify/concurrent_assertion_statement.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import concurrent_assertion_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import assertion +from vsg.vhdlFile.classify import assertion, utils @decorators.print_classifier_debug_info(__name__) @@ -26,13 +25,11 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.label_name, token.label_colon) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) - iCurrent = utils.assign_next_token_if("postponed", token.postponed_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_with_if("postponed", token.postponed_keyword) - iCurrent = assertion.classify(iCurrent, lObjects) + assertion.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/if_statement.py b/vsg/vhdlFile/classify/if_statement.py index f0c73f5d5..407061c13 100644 --- a/vsg/vhdlFile/classify/if_statement.py +++ b/vsg/vhdlFile/classify/if_statement.py @@ -31,19 +31,29 @@ def classify(oDataStructure): condition.classify_until(["then"], oDataStructure) oDataStructure.replace_next_token_required("then", token.then_keyword) - sequence_of_statements.detect(oDataStructure) + sequence_of_statements.detect(oDataStructure, ["elsif", "else", "end"]) while oDataStructure.is_next_token_one_of(["else", "elsif"]): if oDataStructure.is_next_token("elsif"): - oDataStructure.replace_next_token_with(token.elsif_keyword) - condition.classify_until(["then"], oDataStructure) - oDataStructure.replace_next_token_required("then", token.then_keyword) - iCurrent = sequence_of_statements.detect(oDataStructure) + classify_elsif(oDataStructure) else: - oDataStructure.replace_next_token_with(token.else_keyword) - sequence_of_statements.detect(oDataStructure) + classify_else(oDataStructure) oDataStructure.replace_next_token_required("end", token.end_keyword) oDataStructure.replace_next_token_required("if", token.end_if_keyword) oDataStructure.replace_next_token_with_if_not(";", token.end_if_label) oDataStructure.replace_next_token_required(";", token.semicolon) + + +@decorators.print_classifier_debug_info(__name__) +def classify_elsif(oDataStructure): + oDataStructure.replace_next_token_with(token.elsif_keyword) + condition.classify_until(["then"], oDataStructure) + oDataStructure.replace_next_token_required("then", token.then_keyword) + sequence_of_statements.detect(oDataStructure, ["elsif", "else", "end"]) + + +@decorators.print_classifier_debug_info(__name__) +def classify_else(oDataStructure): + oDataStructure.replace_next_token_with(token.else_keyword) + sequence_of_statements.detect(oDataStructure, ["end"]) diff --git a/vsg/vhdlFile/classify/procedure_call.py b/vsg/vhdlFile/classify/procedure_call.py index 75e49c0a2..ae8ad6e1d 100644 --- a/vsg/vhdlFile/classify/procedure_call.py +++ b/vsg/vhdlFile/classify/procedure_call.py @@ -37,19 +37,17 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ procedure_call ::= *procedure*_name [ ( actual_parameter_part ) ] """ - iCurrent = utils.assign_next_token(token.procedure_name, iToken, lObjects) + oDataStructure.replace_next_token_with(token.procedure_name) - if utils.is_next_token("(", iToken, lObjects): - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) + if oDataStructure.is_next_token("("): + oDataStructure.replace_next_token_with("(", token.open_parenthesis) - iCurrent = actual_parameter_part.classify(iCurrent, lObjects) + actual_parameter_part.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(")", token.close_parenthesis) diff --git a/vsg/vhdlFile/classify/procedure_call_statement.py b/vsg/vhdlFile/classify/procedure_call_statement.py index d52f1f591..db010116f 100644 --- a/vsg/vhdlFile/classify/procedure_call_statement.py +++ b/vsg/vhdlFile/classify/procedure_call_statement.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import procedure_call_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import procedure_call +from vsg.vhdlFile.classify import procedure_call, utils lKeywords = ["null", "return", "exit", "next", "while", "for", "loop", "case", "if", "report", "assert", "wait", "end", "with", "else", "elsif", "when"] @@ -21,33 +20,10 @@ def detect(oDataStructure): return False -# iCurrent = iToken -# # Move past label if it exists -# if utils.find_in_next_n_tokens(":", 2, iCurrent, lObjects): -# iCurrent = utils.find_next_token(iCurrent, lObjects) -# iCurrent += 1 -# iCurrent = utils.find_next_token(iCurrent, lObjects) -# iCurrent += 1 -# # Check if next token is keyword -# iCurrent = utils.find_next_token(iCurrent, lObjects) -# if lObjects[iCurrent].get_lower_value() in lKeywords: -# return iToken -# # Check if signal assignment operator exists -# if not utils.all_assignments_inside_parenthesis(iToken, ";", lObjects): -# return iToken -# # Check if variable assignment operator exists -# if utils.find_in_range(":=", iCurrent, ";", lObjects): -# return iToken -# # Otherwise it must be a procedure_call_statement -# return classify(iToken, lObjects) - - @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.label, token.label_colon) - - iCurrent = procedure_call.classify(iCurrent, lObjects) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.label, token.label_colon) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + procedure_call.classify(oDataStructure) - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/sequence_of_statements.py b/vsg/vhdlFile/classify/sequence_of_statements.py index 1f96300ed..82a3ebef2 100644 --- a/vsg/vhdlFile/classify/sequence_of_statements.py +++ b/vsg/vhdlFile/classify/sequence_of_statements.py @@ -5,10 +5,10 @@ @decorators.print_classifier_debug_info(__name__) -def detect(oDataStructure): +def detect(oDataStructure, lUnless): """ sequence_of_statements ::= { sequential_statement } """ - while sequential_statement.detect(oDataStructure): - pass + while not oDataStructure.is_next_token_one_of(lUnless): + sequential_statement.detect(oDataStructure) From ea03c1df77fb9d5f83d151323adcac4996bec58a Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 23 Mar 2025 15:56:59 -0500 Subject: [PATCH 045/124] attribute_declaration tests pass. --- vsg/vhdlFile/classify/attribute_declaration.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/vsg/vhdlFile/classify/attribute_declaration.py b/vsg/vhdlFile/classify/attribute_declaration.py index 7ae6416c0..54a0a8ca3 100644 --- a/vsg/vhdlFile/classify/attribute_declaration.py +++ b/vsg/vhdlFile/classify/attribute_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import attribute_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import type_mark @@ -19,13 +18,11 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("attribute", token.attribute_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token(token.identifier, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("attribute", token.attribute_keyword) + oDataStructure.replace_next_token_with(token.identifier) + oDataStructure.replace_next_token_required(":", token.colon) - iCurrent = type_mark.classify(iCurrent, lObjects) + type_mark.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) From 1f2ca04920b87790f1e4edb29b78476361eb9258 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 23 Mar 2025 20:35:52 -0500 Subject: [PATCH 046/124] block rules pass. --- .../classify/block_declarative_part.py | 6 ++-- vsg/vhdlFile/classify/block_header.py | 21 ++++------- vsg/vhdlFile/classify/block_statement.py | 36 +++++++++---------- vsg/vhdlFile/classify/block_statement_part.py | 6 ++-- 4 files changed, 30 insertions(+), 39 deletions(-) diff --git a/vsg/vhdlFile/classify/block_declarative_part.py b/vsg/vhdlFile/classify/block_declarative_part.py index b4d5a6b19..ff7123cc4 100644 --- a/vsg/vhdlFile/classify/block_declarative_part.py +++ b/vsg/vhdlFile/classify/block_declarative_part.py @@ -1,15 +1,15 @@ # -*- coding: utf-8 -*- from vsg import decorators -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import block_declarative_item @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ block_declarative_part ::= { block_declarative_item } """ - return utils.detect_submodule(iToken, lObjects, block_declarative_item) + while block_declarative_item.detect(oDataStructure): + pass diff --git a/vsg/vhdlFile/classify/block_header.py b/vsg/vhdlFile/classify/block_header.py index fab399cb8..58677dd18 100644 --- a/vsg/vhdlFile/classify/block_header.py +++ b/vsg/vhdlFile/classify/block_header.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import block_header as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( generic_clause, generic_map_aspect, @@ -12,7 +11,7 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ block_header ::= [ generic_clause @@ -21,18 +20,12 @@ def detect(iToken, lObjects): [ port_map_aspect ; ] ] """ - iCurrent = generic_clause.detect(iToken, lObjects) + generic_clause.detect(oDataStructure) - iLast = iCurrent - iCurrent = generic_map_aspect.detect(iCurrent, lObjects) - if iLast != iCurrent: - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + if generic_map_aspect.detect(oDataStructure): + oDataStructure.replace_next_token_required(";", token.semicolon) - iCurrent = port_clause.detect(iCurrent, lObjects) + port_clause.detect(oDataStructure) - iLast = iCurrent - iCurrent = port_map_aspect.detect(iCurrent, lObjects) - if iLast != iCurrent: - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + if port_map_aspect.detect(oDataStructure): + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/block_statement.py b/vsg/vhdlFile/classify/block_statement.py index aef744d46..c356f4ebd 100644 --- a/vsg/vhdlFile/classify/block_statement.py +++ b/vsg/vhdlFile/classify/block_statement.py @@ -2,11 +2,11 @@ from vsg import decorators from vsg.token import block_statement as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( block_declarative_part, block_header, block_statement_part, + utils, ) @@ -30,28 +30,26 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.block_label, token.label_colon) - iCurrent = utils.assign_next_token_required("block", token.block_keyword, iCurrent, lObjects) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.block_label, token.label_colon) + oDataStructure.replace_next_token_with(token.block_keyword) - if utils.is_next_token("(", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("(", token.guard_open_parenthesis, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(")", token.guard_condition, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(")", token.guard_close_parenthesis, iCurrent, lObjects) + if oDataStructure.is_next_token("("): + oDataStructure.replace_next_token_with(token.guard_open_parenthesis) + oDataStructure.replace_next_token_with_if_not(")", token.guard_condition) + oDataStructure.replace_next_token_required(")", token.guard_close_parenthesis) - iCurrent = utils.assign_next_token_if("is", token.is_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_with_if("is", token.is_keyword) - iCurrent = block_header.detect(iCurrent, lObjects) + block_header.detect(oDataStructure) - iCurrent = block_declarative_part.detect(iCurrent, lObjects) + block_declarative_part.detect(oDataStructure) - iCurrent = utils.assign_next_token_required("begin", token.begin_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("begin", token.begin_keyword) - iCurrent = block_statement_part.detect(iCurrent, lObjects) + block_statement_part.detect(oDataStructure) - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("block", token.end_block_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.end_block_label, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_required("block", token.end_block_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.end_block_label) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/block_statement_part.py b/vsg/vhdlFile/classify/block_statement_part.py index 4f8d0ac86..e3b41c730 100644 --- a/vsg/vhdlFile/classify/block_statement_part.py +++ b/vsg/vhdlFile/classify/block_statement_part.py @@ -1,15 +1,15 @@ # -*- coding: utf-8 -*- from vsg import decorators -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import concurrent_statement @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ block_statement_part ::= { concurrent_statement } """ - return utils.detect_submodule(iToken, lObjects, concurrent_statement) + while concurrent_statement.detect(oDataStructure): + pass From fe48847cbe111ffd7f6d1e249b8b1bb7e82ecd2c Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 23 Mar 2025 21:36:03 -0500 Subject: [PATCH 047/124] case rules pass. --- vsg/token/case_generate_alternative.py | 2 +- vsg/token/case_generate_statement.py | 2 +- vsg/token/case_statement.py | 2 +- .../classify/case_generate_alternative.py | 28 +++++++-------- .../classify/case_generate_statement.py | 26 +++++++------- vsg/vhdlFile/classify/case_statement.py | 27 +++++++-------- .../classify/case_statement_alternative.py | 22 ++++++------ vsg/vhdlFile/classify/choice.py | 32 ++++++++++------- vsg/vhdlFile/classify/choices.py | 16 ++++----- .../classify/generate_statement_body.py | 34 ++++++------------- vsg/vhdlFile/classify/null_statement.py | 10 +++--- 11 files changed, 90 insertions(+), 111 deletions(-) diff --git a/vsg/token/case_generate_alternative.py b/vsg/token/case_generate_alternative.py index 6cf28727c..c8827b8bd 100644 --- a/vsg/token/case_generate_alternative.py +++ b/vsg/token/case_generate_alternative.py @@ -17,7 +17,7 @@ class alternative_label_colon(parser.label_colon): unique_id = case_generate_alternative : alternative_label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() diff --git a/vsg/token/case_generate_statement.py b/vsg/token/case_generate_statement.py index 1f6e37372..2a6f77768 100644 --- a/vsg/token/case_generate_statement.py +++ b/vsg/token/case_generate_statement.py @@ -17,7 +17,7 @@ class label_colon(parser.label_colon): unique_id = case_generate_statement : label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() diff --git a/vsg/token/case_statement.py b/vsg/token/case_statement.py index 42f19cc18..06af9ed70 100644 --- a/vsg/token/case_statement.py +++ b/vsg/token/case_statement.py @@ -17,7 +17,7 @@ class label_colon(parser.label_colon): unique_id = case_statement : label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() diff --git a/vsg/vhdlFile/classify/case_generate_alternative.py b/vsg/vhdlFile/classify/case_generate_alternative.py index 711bc47b3..87edebd3d 100644 --- a/vsg/vhdlFile/classify/case_generate_alternative.py +++ b/vsg/vhdlFile/classify/case_generate_alternative.py @@ -2,35 +2,31 @@ from vsg import decorators from vsg.token import case_generate_alternative as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import choices, generate_statement_body +from vsg.vhdlFile.classify import choices, generate_statement_body, utils @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ case_generate_alternative ::= when [ alternative_label : ] choices => generate_statement_body """ - if utils.is_next_token("when", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token("when"): + classify(oDataStructure) + return True + return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("when", token.when_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("when", token.when_keyword) - if utils.are_next_consecutive_tokens([None, ":"], iCurrent, lObjects): - iCurrent = utils.assign_next_token(token.alternative_label_name, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.alternative_label_colon, iCurrent, lObjects) + utils.tokenize_label(oDataStructure, token.alternative_label_name, token.alternative_label_colon) - iCurrent = choices.classify_until(["=>"], iCurrent, lObjects) + choices.classify_until(["=>"], oDataStructure) - iCurrent = utils.assign_next_token_required("=>", token.assignment, iCurrent, lObjects) + oDataStructure.replace_next_token_required("=>", token.assignment) - iCurrent = generate_statement_body.classify(iCurrent, lObjects) - - return iCurrent + generate_statement_body.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/case_generate_statement.py b/vsg/vhdlFile/classify/case_generate_statement.py index 959ff44c0..72d153e60 100644 --- a/vsg/vhdlFile/classify/case_generate_statement.py +++ b/vsg/vhdlFile/classify/case_generate_statement.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import case_generate_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import case_generate_alternative, expression +from vsg.vhdlFile.classify import case_generate_alternative, expression, utils @decorators.print_classifier_debug_info(__name__) @@ -28,20 +27,19 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.generate_label, token.label_colon) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.generate_label, token.label_colon) - iCurrent = utils.assign_next_token_required("case", token.case_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("case", token.case_keyword) - iCurrent = expression.classify_until(["generate"], iCurrent, lObjects) + expression.classify_until(["generate"], oDataStructure) - iCurrent = utils.assign_next_token_required("generate", token.generate_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("generate", token.generate_keyword) - iToken = utils.detect_submodule(iToken, lObjects, case_generate_alternative) + while case_generate_alternative.detect(oDataStructure): + pass - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("generate", token.end_generate_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.end_generate_label, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_required("generate", token.end_generate_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.end_generate_label) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/case_statement.py b/vsg/vhdlFile/classify/case_statement.py index eba55aa6c..ac1478bce 100644 --- a/vsg/vhdlFile/classify/case_statement.py +++ b/vsg/vhdlFile/classify/case_statement.py @@ -22,21 +22,20 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.case_label, token.label_colon) - iCurrent = utils.assign_next_token_required("case", token.case_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if("?", token.question_mark, iCurrent, lObjects) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.case_label, token.label_colon) + oDataStructure.replace_next_token_required("case", token.case_keyword) + oDataStructure.replace_next_token_with_if("?", token.question_mark) - iCurrent = expression.classify_until(["is"], iCurrent, lObjects) + expression.classify_until(["is"], oDataStructure) - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("is", token.is_keyword) - iCurrent = utils.detect_submodule(iCurrent, lObjects, case_statement_alternative) + while case_statement_alternative.detect(oDataStructure): + pass - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("case", token.end_case_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if("?", token.question_mark, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.end_case_label, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_required("case", token.end_case_keyword) + oDataStructure.replace_next_token_with_if("?", token.question_mark) + oDataStructure.replace_next_token_with_if_not(";", token.end_case_label) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/case_statement_alternative.py b/vsg/vhdlFile/classify/case_statement_alternative.py index 57b521d23..8c34273ed 100644 --- a/vsg/vhdlFile/classify/case_statement_alternative.py +++ b/vsg/vhdlFile/classify/case_statement_alternative.py @@ -2,30 +2,28 @@ from vsg import decorators from vsg.token import case_statement_alternative as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import choices, sequence_of_statements @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ case_statement_alternative ::= when choices => sequence_of_statements """ - if utils.is_next_token("when", iToken, lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.is_next_token("when"): + classify(oDataStructure) + return True + return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("when", token.when_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("when", token.when_keyword) - iCurrent = choices.classify_until(["=>"], iCurrent, lObjects) + choices.classify_until(["=>"], oDataStructure) - iCurrent = utils.assign_next_token_required("=>", token.assignment, iCurrent, lObjects) + oDataStructure.replace_next_token_required("=>", token.assignment) - iCurrent = sequence_of_statements.detect(iCurrent, lObjects) - - return iCurrent + sequence_of_statements.detect(oDataStructure, ["when", "end"]) diff --git a/vsg/vhdlFile/classify/choice.py b/vsg/vhdlFile/classify/choice.py index 9772e7133..dacd2ddb6 100644 --- a/vsg/vhdlFile/classify/choice.py +++ b/vsg/vhdlFile/classify/choice.py @@ -6,7 +6,7 @@ @decorators.print_classifier_debug_info(__name__) -def classify_until(lUntils, iToken, lObjects): +def classify_until(lUntils, oDataStructure): """ choice ::= simple_expression @@ -14,15 +14,23 @@ def classify_until(lUntils, iToken, lObjects): | *element*_simple_name | **others** """ - iParen = 0 - for iIndex in range(iToken, len(lObjects)): - iParen = utils.update_paren_counter(iIndex, lObjects, iParen) - if utils.is_next_token_in_list(lUntils, iIndex, lObjects) and iParen == 0: - return iIndex - if utils.is_item(lObjects, iIndex): - if utils.is_next_token("others", iIndex, lObjects): - utils.assign_next_token_required("others", token.others_keyword, iIndex, lObjects) - else: - utils.assign_next_token(parser.todo, iIndex, lObjects) + if oDataStructure.is_next_token("others"): + oDataStructure.replace_next_token_with(token.others_keyword) + else: + while not oDataStructure.is_next_token_one_of(lUntils): + oDataStructure.replace_next_token_with(parser.todo) - return iToken + +# TODO: Need to watch out for parenthesis in lUntils +# iParen = 0 +# for iIndex in range(iToken, len(lObjects)): +# iParen = utils.update_paren_counter(iIndex, lObjects, iParen) +# if utils.is_next_token_in_list(lUntils, iIndex, lObjects) and iParen == 0: +# return iIndex +# if utils.is_item(lObjects, iIndex): +# if utils.is_next_token("others", iIndex, lObjects): +# utils.assign_next_token_required("others", token.others_keyword, iIndex, lObjects) +# else: +# utils.assign_next_token(parser.todo, iIndex, lObjects) +# +# return iToken diff --git a/vsg/vhdlFile/classify/choices.py b/vsg/vhdlFile/classify/choices.py index 513841e4c..cd3da45f9 100644 --- a/vsg/vhdlFile/classify/choices.py +++ b/vsg/vhdlFile/classify/choices.py @@ -2,24 +2,20 @@ from vsg import decorators from vsg.token import choices as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import choice @decorators.print_classifier_debug_info(__name__) -def classify_until(lUntils, iToken, lObjects): +def classify_until(lUntils, oDataStructure): """ choices ::= choice { | choice } """ - iCurrent = iToken - iLast = 0 + lMyUntils = lUntils lMyUntils.append("|") - while iLast != iCurrent: - iLast = iCurrent - iCurrent = choice.classify_until(lMyUntils, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if("|", token.bar, iCurrent, lObjects) - - return iCurrent + choice.classify_until(lMyUntils, oDataStructure) + while oDataStructure.is_next_token("|"): + oDataStructure.replace_next_token_with(token.bar) + choice.classify_until(lMyUntils, oDataStructure) diff --git a/vsg/vhdlFile/classify/generate_statement_body.py b/vsg/vhdlFile/classify/generate_statement_body.py index 589c2b873..9179d4d8d 100644 --- a/vsg/vhdlFile/classify/generate_statement_body.py +++ b/vsg/vhdlFile/classify/generate_statement_body.py @@ -2,12 +2,11 @@ from vsg import decorators from vsg.token import generate_statement_body as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import block_declarative_part, concurrent_statement @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ generate_statement_body ::= [ block_declarative_part @@ -15,27 +14,14 @@ def classify(iToken, lObjects): { concurrent_statement } [ end [ alternative_label ] ; ] """ - iCurrent = utils.find_next_token(iToken, lObjects) - iLast = iCurrent - iCurrent = block_declarative_part.detect(iCurrent, lObjects) + if block_declarative_part.detect(oDataStructure): + oDataStructure.replace_next_token_required("begin", token.begin_keyword) - if iCurrent != iLast: - iCurrent = utils.assign_next_token_required("begin", token.begin_keyword, iCurrent, lObjects) + while not oDataStructure.is_next_token_one_of(["elsif", "else", "when", "end"]): + concurrent_statement.detect(oDataStructure) - iCurrent = utils.assign_next_token_if("begin", token.begin_keyword, iCurrent, lObjects) - - iLast = 0 - while iCurrent != iLast: - iLast = iCurrent - if utils.is_next_token_one_of(["elsif", "else", "when"], iCurrent, lObjects): - return iCurrent - if utils.is_next_token_one_of(["end"], iCurrent, lObjects): - break - iCurrent = concurrent_statement.detect(iCurrent, lObjects) - - if not utils.are_next_consecutive_tokens(["end", "generate"], iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.alternative_label, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + if oDataStructure.is_next_token("end"): + if not oDataStructure.are_next_consecutive_tokens(["end", "generate"]): + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.alternative_label) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/null_statement.py b/vsg/vhdlFile/classify/null_statement.py index 68f4a2a38..ccc0e6214 100644 --- a/vsg/vhdlFile/classify/null_statement.py +++ b/vsg/vhdlFile/classify/null_statement.py @@ -18,9 +18,7 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.label, token.label_colon) - iCurrent = utils.assign_next_token_required("null", token.null_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.label, token.label_colon) + oDataStructure.replace_next_token_required("null", token.null_keyword) + oDataStructure.replace_next_token_required(";", token.semicolon) From 6f7d3a13b18921188e1fdd8111c4492c6a8ff482 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 24 Mar 2025 20:58:33 -0500 Subject: [PATCH 048/124] choice test passing. --- .../concurrent_selected_signal_assignment.py | 26 ++++++------ vsg/vhdlFile/classify/selected_expressions.py | 22 ++++------ .../classify/selected_signal_assignment.py | 12 ++---- .../classify/selected_variable_assignment.py | 24 +++++------ .../classify/selected_waveform_assignment.py | 41 ++++++++++--------- vsg/vhdlFile/classify/selected_waveforms.py | 25 +++++------ 6 files changed, 72 insertions(+), 78 deletions(-) diff --git a/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py index a1524ced5..363c84cfd 100644 --- a/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_selected_signal_assignment.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import concurrent_selected_signal_assignment as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import delay_mechanism, expression, selected_waveforms +from vsg.vhdlFile.classify import delay_mechanism, expression, selected_waveforms, utils @decorators.print_classifier_debug_info(__name__) @@ -22,23 +21,22 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("with", token.with_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("with", token.with_keyword) - iCurrent = expression.classify_until(["select"], iCurrent, lObjects) + expression.classify_until(["select"], oDataStructure) - iCurrent = utils.assign_next_token_required("select", token.select_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if("?", token.question_mark, iCurrent, lObjects) + oDataStructure.replace_next_token_required("select", token.select_keyword) + oDataStructure.replace_next_token_with_if("?", token.question_mark) - iCurrent = utils.assign_tokens_until("<=", token.target, iCurrent, lObjects) + utils.assign_tokens_until("<=", token.target, oDataStructure) - iCurrent = utils.assign_next_token_required("<=", token.assignment, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if("guarded", token.guarded_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("<=", token.assignment) - iCurrent = delay_mechanism.detect(iCurrent, lObjects) + oDataStructure.replace_next_token_with_if("guarded", token.guarded_keyword) - selected_waveforms.classify_until([";"], iToken, lObjects) + delay_mechanism.detect(oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + selected_waveforms.classify_until([";"], oDataStructure) - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/selected_expressions.py b/vsg/vhdlFile/classify/selected_expressions.py index a0ecc0118..2caaf1bc1 100644 --- a/vsg/vhdlFile/classify/selected_expressions.py +++ b/vsg/vhdlFile/classify/selected_expressions.py @@ -2,35 +2,31 @@ from vsg import decorators from vsg.token import selected_expressions as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import choices, expression @decorators.print_classifier_debug_info(__name__) -def classify_until(lUntils, iToken, lObjects): +def classify_until(lUntils, oDataStructure): """ selected_expressions ::= { expression when choices , } expression when choices """ - iCurrent = iToken lMyUntils = lUntils lMyUntils.append(",") - iCurrent = expression.classify_until(["when"], iCurrent, lObjects) + expression.classify_until(["when"], oDataStructure) - iCurrent = utils.assign_next_token_required("when", token.when_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("when", token.when_keyword) - iCurrent = choices.classify_until(lMyUntils, iCurrent, lObjects) + choices.classify_until(lMyUntils, oDataStructure) - while utils.is_next_token(",", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(",", token.comma, iCurrent, lObjects) + while oDataStructure.is_next_token(","): + oDataStructure.replace_next_token_required(",", token.comma) - iCurrent = expression.classify_until(["when"], iCurrent, lObjects) + expression.classify_until(["when"], oDataStructure) - iCurrent = utils.assign_next_token_required("when", token.when_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("when", token.when_keyword) - iCurrent = choices.classify_until(lMyUntils, iCurrent, lObjects) - - return iCurrent + choices.classify_until(lMyUntils, oDataStructure) diff --git a/vsg/vhdlFile/classify/selected_signal_assignment.py b/vsg/vhdlFile/classify/selected_signal_assignment.py index c9768fec5..d0b644022 100644 --- a/vsg/vhdlFile/classify/selected_signal_assignment.py +++ b/vsg/vhdlFile/classify/selected_signal_assignment.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg import decorators -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( selected_force_assignment, selected_waveform_assignment, @@ -25,11 +24,8 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = selected_waveform_assignment.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent +def classify(oDataStructure): + if selected_waveform_assignment.detect(oDataStructure): + return None - iCurrent = selected_force_assignment.detect(iToken, lObjects) - - return iCurrent + selected_force_assignment.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/selected_variable_assignment.py b/vsg/vhdlFile/classify/selected_variable_assignment.py index 758d80cbf..6ed250576 100644 --- a/vsg/vhdlFile/classify/selected_variable_assignment.py +++ b/vsg/vhdlFile/classify/selected_variable_assignment.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import selected_variable_assignment as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import expression, selected_expressions +from vsg.vhdlFile.classify import expression, selected_expressions, utils @decorators.print_classifier_debug_info(__name__) @@ -23,18 +22,19 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("with", token.with_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("with", token.with_keyword) - iCurrent = expression.classify_until(["select"], iToken, lObjects) + expression.classify_until(["select"], oDataStructure) - iCurrent = utils.assign_next_token_required("select", token.select_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("?", token.question_mark, iCurrent, lObjects) - iCurrent = utils.assign_tokens_until(":=", token.target, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(":=", token.assignment, iCurrent, lObjects) + oDataStructure.replace_next_token_required("select", token.select_keyword) - iCurrent = selected_expressions.classify_until([";"], iToken, lObjects) + oDataStructure.replace_next_token_with_if("?", token.question_mark) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + utils.assign_tokens_until(":=", token.target, oDataStructure) - return iCurrent + oDataStructure.replace_next_token_required(":=", token.assignment) + + selected_expressions.classify_until([";"], oDataStructure) + + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/selected_waveform_assignment.py b/vsg/vhdlFile/classify/selected_waveform_assignment.py index e6b483bd1..7ae992e86 100644 --- a/vsg/vhdlFile/classify/selected_waveform_assignment.py +++ b/vsg/vhdlFile/classify/selected_waveform_assignment.py @@ -2,39 +2,42 @@ from vsg import decorators from vsg.token import selected_waveform_assignment as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import delay_mechanism, expression, selected_waveforms +from vsg.vhdlFile.classify import delay_mechanism, expression, selected_waveforms, utils @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ selected_waveform_assignment ::= with expression select [ ? ] target <= [delay_machanism] selected_waveforms ; """ - if utils.is_next_token_one_of(["when", "if", "elsif", "else"], iToken, lObjects): + if oDataStructure.is_next_token_one_of(["when", "if", "elsif", "else"]): return False - if utils.find_in_range("<=", iToken, ";", lObjects): - if not utils.find_in_range("force", iToken, ";", lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.does_string_exist_before_string("<=", ";"): + if not oDataStructure.does_string_exist_before_string("force", ";"): + classify(oDataStructure) + return True + return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("with", token.with_keyword, iToken, lObjects) - iCurrent = expression.classify_until(["select"], iToken, lObjects) - iCurrent = utils.assign_next_token_required("select", token.select_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("?", token.question_mark, iCurrent, lObjects) - iCurrent = utils.assign_tokens_until("<=", token.target, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("<=", token.assignment, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("with", token.with_keyword) - iCurrent = delay_mechanism.detect(iCurrent, lObjects) + expression.classify_until(["select"], oDataStructure) - iCurrent = selected_waveforms.classify_until([";"], iToken, lObjects) + oDataStructure.replace_next_token_required("select", token.select_keyword) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + oDataStructure.replace_next_token_with_if("?", token.question_mark) - return iCurrent + utils.assign_tokens_until("<=", token.target, oDataStructure) + + oDataStructure.replace_next_token_required("<=", token.assignment) + + delay_mechanism.detect(oDataStructure) + + selected_waveforms.classify_until([";"], oDataStructure) + + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/selected_waveforms.py b/vsg/vhdlFile/classify/selected_waveforms.py index b5b5c56f3..c8ad48f3a 100644 --- a/vsg/vhdlFile/classify/selected_waveforms.py +++ b/vsg/vhdlFile/classify/selected_waveforms.py @@ -2,29 +2,30 @@ from vsg import decorators, parser from vsg.token import selected_waveforms as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import choices, waveform @decorators.print_classifier_debug_info(__name__) -def classify_until(lUntils, iToken, lObjects): +def classify_until(lUntils, oDataStructure): """ selected_waveforms ::= { waveform when choices , } waveform when choices """ - iCurrent = iToken lMyUntils = lUntils lMyUntils.append(",") - iCurrent = waveform.classify_until(["when"], iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("when", token.when_keyword, iCurrent, lObjects) - iCurrent = choices.classify_until(lMyUntils, iCurrent, lObjects) + waveform.classify_until(["when"], oDataStructure) - while utils.is_next_token(",", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(",", token.comma, iCurrent, lObjects) - iCurrent = waveform.classify_until(["when"], iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("when", token.when_keyword, iCurrent, lObjects) - iCurrent = choices.classify_until(lMyUntils, iCurrent, lObjects) + oDataStructure.replace_next_token_required("when", token.when_keyword) - return iCurrent + choices.classify_until(lMyUntils, oDataStructure) + + while oDataStructure.is_next_token(","): + oDataStructure.replace_next_token_with(token.comma) + + waveform.classify_until(["when"], oDataStructure) + + oDataStructure.replace_next_token_required("when", token.when_keyword) + + choices.classify_until(lMyUntils, oDataStructure) From 98eafbc06d911bd511c0782f748e5b36f85ab0c4 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 24 Mar 2025 21:03:25 -0500 Subject: [PATCH 049/124] comment rules passing. --- .../classify/package_body_declarative_item.py | 3 ++- vsg/vhdlFile/classify/return_statement.py | 17 +++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/vsg/vhdlFile/classify/package_body_declarative_item.py b/vsg/vhdlFile/classify/package_body_declarative_item.py index 3859e56a2..c1b47d3ee 100644 --- a/vsg/vhdlFile/classify/package_body_declarative_item.py +++ b/vsg/vhdlFile/classify/package_body_declarative_item.py @@ -45,7 +45,8 @@ def detect(oDataStructure): """ if subprogram_declaration.detect(oDataStructure): - return subprogram_body.detect(iReturn, lObjects) + subprogram_body.detect(oDataStructure) + return True if subprogram_instantiation_declaration.detect(oDataStructure): return True diff --git a/vsg/vhdlFile/classify/return_statement.py b/vsg/vhdlFile/classify/return_statement.py index 6b06e95c1..7681d6fe1 100644 --- a/vsg/vhdlFile/classify/return_statement.py +++ b/vsg/vhdlFile/classify/return_statement.py @@ -19,11 +19,12 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.label, token.label_colon) - iCurrent = utils.assign_next_token_required("return", token.return_keyword, iCurrent, lObjects) - if not utils.is_next_token(";", iCurrent, lObjects): - iCurrent = expression.classify_until([";"], iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.label, token.label_colon) + + oDataStructure.replace_next_token_required("return", token.return_keyword) + + if not oDataStructure.is_next_token(";"): + expression.classify_until([";"], oDataStructure) + + oDataStructure.replace_next_token_required(";", token.semicolon) From 4d7c287919403331d4a72c1fdc985669b5285d26 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 24 Mar 2025 21:38:42 -0500 Subject: [PATCH 050/124] concurrent tests pass. --- vsg/token/for_generate_statement.py | 2 +- vsg/token/if_generate_statement.py | 3 +- .../classify/actual_parameter_part.py | 4 +- ...oncurrent_conditional_signal_assignment.py | 19 +++-- .../concurrent_procedure_call_statement.py | 15 ++-- .../classify/conditional_waveforms.py | 26 ++++--- .../classify/for_generate_statement.py | 33 ++++----- .../classify/if_generate_statement.py | 69 ++++++++++--------- .../classify/parameter_specification.py | 10 ++- vsg/vhdlFile/classify/procedure_call.py | 2 +- vsg/vhdlFile/classify/utils.py | 2 +- 11 files changed, 97 insertions(+), 88 deletions(-) diff --git a/vsg/token/for_generate_statement.py b/vsg/token/for_generate_statement.py index 4e007d8e8..045284fe7 100644 --- a/vsg/token/for_generate_statement.py +++ b/vsg/token/for_generate_statement.py @@ -17,7 +17,7 @@ class label_colon(parser.label_colon): unique_id = for_generate_statement : label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() diff --git a/vsg/token/if_generate_statement.py b/vsg/token/if_generate_statement.py index 02eaef6c9..34e991670 100644 --- a/vsg/token/if_generate_statement.py +++ b/vsg/token/if_generate_statement.py @@ -17,7 +17,7 @@ class label_colon(parser.label_colon): unique_id = if_generate_statement : label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() @@ -39,6 +39,7 @@ def __init__(self, sString): super().__init__(sString) +# TODO: This colon may not have a test class alternative_label_colon(parser.label_colon): """ unique_id = if_generate_statement : alternative_label_colon diff --git a/vsg/vhdlFile/classify/actual_parameter_part.py b/vsg/vhdlFile/classify/actual_parameter_part.py index a5a484267..c04fdfa24 100644 --- a/vsg/vhdlFile/classify/actual_parameter_part.py +++ b/vsg/vhdlFile/classify/actual_parameter_part.py @@ -5,10 +5,10 @@ @decorators.print_classifier_debug_info(__name__) -def classify(iTokent, lObjects): +def classify(oDataStructure): """ actual_parameter_part ::= *parameter*_association_list """ - return association_list.classify(iTokent, lObjects) + association_list.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py index 8a5d70d93..9c5b5cf19 100644 --- a/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import concurrent_conditional_signal_assignment as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import conditional_waveforms, delay_mechanism +from vsg.vhdlFile.classify import conditional_waveforms, delay_mechanism, utils @decorators.print_classifier_debug_info(__name__) @@ -45,19 +44,19 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ concurrent_conditional_signal_assignment ::= target <= [ guarded ] [ delay_mechanism ] conditional_waveforms ; """ - iCurrent = utils.assign_tokens_until("<=", token.target, iToken, lObjects) - iCurrent = utils.assign_next_token_required("<=", token.assignment, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if("guarded", token.guarded_keyword, iCurrent, lObjects) + utils.assign_tokens_until("<=", token.target, oDataStructure) - iCurrent = delay_mechanism.detect(iCurrent, lObjects) + oDataStructure.replace_next_token_required("<=", token.assignment) - iCurrent = conditional_waveforms.classify_until([";"], iCurrent, lObjects) + oDataStructure.replace_next_token_with_if("guarded", token.guarded_keyword) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + delay_mechanism.detect(oDataStructure) - return iCurrent + conditional_waveforms.classify_until([";"], oDataStructure) + + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py b/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py index b581e7e02..66b17346b 100644 --- a/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py +++ b/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import concurrent_procedure_call_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import procedure_call +from vsg.vhdlFile.classify import procedure_call, utils @decorators.print_classifier_debug_info(__name__) @@ -13,10 +12,14 @@ def detect(oDataStructure): [ label : ] [ postponed ] procedure_call ; """ if procedure_call.detect(oDataStructure): - iCurrent = utils.tokenize_label(iToken, lObjects, token.label_name, token.label_colon) - iCurrent = utils.tokenize_postponed(iCurrent, lObjects, token.postponed_keyword) - iCurrent = procedure_call.classify(iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) + + oDataStructure.replace_next_token_with_if("postponed", token.postponed_keyword) + + procedure_call.classify(oDataStructure) + + oDataStructure.replace_next_token_required(";", token.semicolon) + return True return False diff --git a/vsg/vhdlFile/classify/conditional_waveforms.py b/vsg/vhdlFile/classify/conditional_waveforms.py index f93eb7d1d..4841c3843 100644 --- a/vsg/vhdlFile/classify/conditional_waveforms.py +++ b/vsg/vhdlFile/classify/conditional_waveforms.py @@ -7,7 +7,7 @@ @decorators.print_classifier_debug_info(__name__) -def classify_until(lUntils, iToken, lObjects): +def classify_until(lUntils, oDataStructure): """ conditional_waveforms ::= waveform when condition @@ -20,16 +20,20 @@ def classify_until(lUntils, iToken, lObjects): lMyWhenUntils = lUntils.copy() lMyWhenUntils.append("when") - iCurrent = waveform.classify_until(["when"], iToken, lObjects) - iCurrent = utils.assign_next_token_required("when", token.when_keyword, iCurrent, lObjects) - iCurrent = condition.classify_until(lMyElseUntils, iCurrent, lObjects) + waveform.classify_until(["when"], oDataStructure) - while utils.is_next_token("else", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("else", token.else_keyword, iCurrent, lObjects) - iCurrent = waveform.classify_until(lMyWhenUntils, iCurrent, lObjects) - if utils.is_next_token_in_list(lUntils, iToken, lObjects): + oDataStructure.replace_next_token_required("when", token.when_keyword) + + condition.classify_until(lMyElseUntils, oDataStructure) + + while oDataStructure.is_next_token("else"): + oDataStructure.replace_next_token_required("else", token.else_keyword) + + waveform.classify_until(lMyWhenUntils, oDataStructure) + + if oDataStructure.is_next_token_one_of(lUntils): break - iCurrent = utils.assign_next_token_required("when", token.when_keyword, iCurrent, lObjects) - iCurrent = condition.classify_until(lMyElseUntils, iCurrent, lObjects) - return iCurrent + oDataStructure.replace_next_token_required("when", token.when_keyword) + + condition.classify_until(lMyElseUntils, oDataStructure) diff --git a/vsg/vhdlFile/classify/for_generate_statement.py b/vsg/vhdlFile/classify/for_generate_statement.py index ac4739dec..28905fda7 100644 --- a/vsg/vhdlFile/classify/for_generate_statement.py +++ b/vsg/vhdlFile/classify/for_generate_statement.py @@ -2,8 +2,11 @@ from vsg import decorators from vsg.token import for_generate_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import generate_statement_body, parameter_specification +from vsg.vhdlFile.classify import ( + generate_statement_body, + parameter_specification, + utils, +) @decorators.print_classifier_debug_info(__name__) @@ -20,27 +23,25 @@ def detect(oDataStructure): classify(oDataStructure) return True if oDataStructure.is_next_token("for"): - iIndex = utils.find_next_token(iToken, lObjects) - oToken = token.for_keyword(lObjects[iToken].get_value()) + iIndex = utils.find_next_token(iCurrent, lObjects) + oToken = token.for_keyword(lObjects[iCurrent].get_value()) utils.print_error_message("generate_label", oToken, iIndex, lObjects) return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.generate_label, token.label_colon) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.generate_label, token.label_colon) - iCurrent = utils.assign_next_token_required("for", token.for_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("for", token.for_keyword) - iCurrent = parameter_specification.classify_until(["generate"], iCurrent, lObjects) + parameter_specification.classify_until(["generate"], oDataStructure) - iCurrent = utils.assign_next_token_required("generate", token.generate_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("generate", token.generate_keyword) - iCurrent = generate_statement_body.classify(iCurrent, lObjects) + generate_statement_body.classify(oDataStructure) - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("generate", token.end_generate_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.end_generate_label, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_required("generate", token.end_generate_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.end_generate_label) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/if_generate_statement.py b/vsg/vhdlFile/classify/if_generate_statement.py index 062a145a6..f17680870 100644 --- a/vsg/vhdlFile/classify/if_generate_statement.py +++ b/vsg/vhdlFile/classify/if_generate_statement.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import if_generate_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import condition, generate_statement_body +from vsg.vhdlFile.classify import condition, generate_statement_body, utils @decorators.print_classifier_debug_info(__name__) @@ -24,55 +23,59 @@ def detect(oDataStructure): classify(oDataStructure) return True if oDataStructure.is_next_token("if"): - iIndex = utils.find_next_token(iToken, lObjects) - oToken = token.if_keyword(lObjects[iToken].get_value()) + iIndex = utils.find_next_token(iCurrent, lObjects) + oToken = token.if_keyword(lObjects[iCurrent].get_value()) utils.print_error_message("generate_label", oToken, iIndex, lObjects) return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.generate_label, token.label_colon) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.generate_label, token.label_colon) - iCurrent = utils.assign_next_token_required("if", token.if_keyword, iCurrent, lObjects) + classify_if(oDataStructure) - if utils.are_next_consecutive_tokens([None, ":"], iCurrent, lObjects): - iCurrent = utils.assign_next_token(token.alternative_label_name, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.alternative_label_colon, iCurrent, lObjects) + while oDataStructure.is_next_token("elsif"): + classify_elsif(oDataStructure) - iCurrent = condition.classify_until(["generate"], iCurrent, lObjects) + if oDataStructure.is_next_token("else"): + classify_else(oDataStructure) - iCurrent = utils.assign_next_token_required("generate", token.generate_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_required("generate", token.end_generate_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.end_generate_label) + oDataStructure.replace_next_token_required(";", token.semicolon) - iCurrent = generate_statement_body.classify(iCurrent, lObjects) - while utils.is_next_token("elsif", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("elsif", token.elsif_keyword, iCurrent, lObjects) +def classify_if(oDataStructure): + oDataStructure.replace_next_token_required("if", token.if_keyword) - if utils.are_next_consecutive_tokens([None, ":"], iCurrent, lObjects): - iCurrent = utils.assign_next_token(token.alternative_label_name, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.alternative_label_colon, iCurrent, lObjects) + classify_line(oDataStructure) - iCurrent = condition.classify_until(["generate"], iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("generate", token.generate_keyword, iCurrent, lObjects) +def classify_elsif(oDataStructure): + oDataStructure.replace_next_token_required("elsif", token.elsif_keyword) - iCurrent = generate_statement_body.classify(iCurrent, lObjects) + classify_line(oDataStructure) - if utils.is_next_token("else", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("else", token.else_keyword, iCurrent, lObjects) - if utils.are_next_consecutive_tokens([None, ":"], iCurrent, lObjects): - iCurrent = utils.assign_next_token(token.alternative_label_name, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.alternative_label_colon, iCurrent, lObjects) +def classify_else(oDataStructure): + oDataStructure.replace_next_token_required("else", token.else_keyword) - iCurrent = utils.assign_next_token_required("generate", token.generate_keyword, iCurrent, lObjects) + classify_line(oDataStructure) - iCurrent = generate_statement_body.classify(iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("generate", token.end_generate_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.end_generate_label, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) +def classify_line(oDataStructure): + classify_alternative_label(oDataStructure) - return iCurrent + condition.classify_until(["generate"], oDataStructure) + + oDataStructure.replace_next_token_required("generate", token.generate_keyword) + + generate_statement_body.classify(oDataStructure) + + +def classify_alternative_label(oDataStructure): + if oDataStructure.are_next_consecutive_tokens([None, ":"]): + oDataStructure.replace_next_token_with(token.alternative_label_name) + oDataStructure.replace_next_token_with(token.alternative_label_colon) diff --git a/vsg/vhdlFile/classify/parameter_specification.py b/vsg/vhdlFile/classify/parameter_specification.py index ca6e3ae77..723b73506 100644 --- a/vsg/vhdlFile/classify/parameter_specification.py +++ b/vsg/vhdlFile/classify/parameter_specification.py @@ -7,15 +7,13 @@ @decorators.print_classifier_debug_info(__name__) -def classify_until(lUntils, iToken, lObjects): +def classify_until(lUntils, oDataStructure): """ parameter_specification ::= identifier in discrete_range """ - iCurrent = utils.assign_next_token(token.identifier, iToken, lObjects) - iCurrent = utils.assign_next_token_required("in", token.in_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_with(token.identifier) + oDataStructure.replace_next_token_required("in", token.in_keyword) - iCurrent = discrete_range.classify_until(lUntils, iCurrent, lObjects) - - return iCurrent + discrete_range.classify_until(lUntils, oDataStructure) diff --git a/vsg/vhdlFile/classify/procedure_call.py b/vsg/vhdlFile/classify/procedure_call.py index ae8ad6e1d..8993a5b76 100644 --- a/vsg/vhdlFile/classify/procedure_call.py +++ b/vsg/vhdlFile/classify/procedure_call.py @@ -46,7 +46,7 @@ def classify(oDataStructure): oDataStructure.replace_next_token_with(token.procedure_name) if oDataStructure.is_next_token("("): - oDataStructure.replace_next_token_with("(", token.open_parenthesis) + oDataStructure.replace_next_token_with(token.open_parenthesis) actual_parameter_part.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 3f3697171..e2c21d95e 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -108,7 +108,7 @@ def assign_special_tokens(oDataStructure, oType): else: oDataStructure.replace_current_token_with(parser.todo) elif sValue == "+": - if isinstance(lObjects[iCurrent - 1], exponent.e_keyword): + if isinstance(oDataStructure.lAllObjects[oDataStructure.iCurrent - 1], exponent.e_keyword): oDataStructure.replace_current_token_with(exponent.plus_sign) else: oDataStructure.replace_current_token_with(parser.todo) From bcdc6820e234bb15bca5ebc7c593c534b9a9ae90 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Tue, 25 Mar 2025 07:38:54 -0500 Subject: [PATCH 051/124] conditional_expression tests pass. --- .../classify/conditional_expressions.py | 25 +++++++-------- .../classify/conditional_force_assignment.py | 32 +++++++++---------- .../classify/conditional_signal_assignment.py | 11 +++---- .../conditional_variable_assignment.py | 23 ++++--------- vsg/vhdlFile/classify/force_mode.py | 10 +++--- 5 files changed, 41 insertions(+), 60 deletions(-) diff --git a/vsg/vhdlFile/classify/conditional_expressions.py b/vsg/vhdlFile/classify/conditional_expressions.py index 3b5f54243..5bb5ff23a 100644 --- a/vsg/vhdlFile/classify/conditional_expressions.py +++ b/vsg/vhdlFile/classify/conditional_expressions.py @@ -2,12 +2,11 @@ from vsg import decorators from vsg.token import conditional_expressions as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import condition, expression +from vsg.vhdlFile.classify import condition, expression, utils @decorators.print_classifier_debug_info(__name__) -def classify_until(lUntils, iToken, lObjects): +def classify_until(lUntils, oDataStructure): """ conditional_expressions ::= expression when condition @@ -20,16 +19,14 @@ def classify_until(lUntils, iToken, lObjects): lMyWhenUntils = lUntils.copy() lMyWhenUntils.append("when") - iCurrent = expression.classify_until(["when"], iToken, lObjects) - iCurrent = utils.assign_next_token_required("when", token.when_keyword, iCurrent, lObjects) - iCurrent = condition.classify_until(lMyElseUntils, iCurrent, lObjects) + expression.classify_until(["when"], oDataStructure) + oDataStructure.replace_next_token_required("when", token.when_keyword) + condition.classify_until(lMyElseUntils, oDataStructure) - while utils.is_next_token("else", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("else", token.else_keyword, iCurrent, lObjects) - iCurrent = expression.classify_until(lMyWhenUntils, iCurrent, lObjects) - if utils.is_next_token_in_list(lUntils, iCurrent, lObjects): + while oDataStructure.is_next_token("else"): + oDataStructure.replace_next_token_required("else", token.else_keyword) + expression.classify_until(lMyWhenUntils, oDataStructure) + if oDataStructure.is_next_token_one_of(lUntils): break - iCurrent = utils.assign_next_token_required("when", token.when_keyword, iCurrent, lObjects) - iCurrent = condition.classify_until(lMyElseUntils, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("when", token.when_keyword) + condition.classify_until(lMyElseUntils, oDataStructure) diff --git a/vsg/vhdlFile/classify/conditional_force_assignment.py b/vsg/vhdlFile/classify/conditional_force_assignment.py index 864e018fd..fde0aaac3 100644 --- a/vsg/vhdlFile/classify/conditional_force_assignment.py +++ b/vsg/vhdlFile/classify/conditional_force_assignment.py @@ -2,35 +2,35 @@ from vsg import decorators from vsg.token import conditional_force_assignment as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import conditional_expressions, force_mode +from vsg.vhdlFile.classify import conditional_expressions, force_mode, utils @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ conditional_force_assignment ::= target <= force [ force_mode ] conditional_expressions ; """ - if utils.is_next_token_one_of(["when", "if", "elsif", "else"], iToken, lObjects): + if oDataStructure.is_next_token_one_of(["when", "if", "elsif", "else"]): return False - if utils.find_in_range("<=", iToken, ";", lObjects): # - if utils.find_in_range("force", iToken, ";", lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.does_string_exist_before_string("<=", ";"): + if oDataStructure.does_string_exist_before_string("force", ";"): + classify(oDataStructure) + return True + return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_tokens_until("<=", token.target, iToken, lObjects) - iCurrent = utils.assign_next_token_required("<=", token.assignment, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("force", token.force_keyword, iCurrent, lObjects) +def classify(oDataStructure): + utils.assign_tokens_until("<=", token.target, oDataStructure) - iCurrent = force_mode.detect(iCurrent, lObjects) + oDataStructure.replace_next_token_required("<=", token.assignment) - iCurrent = conditional_expressions.classify_until([";"], iCurrent, lObjects) + oDataStructure.replace_next_token_required("force", token.force_keyword) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + force_mode.detect(oDataStructure) - return iCurrent + conditional_expressions.classify_until([";"], oDataStructure) + + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/conditional_signal_assignment.py b/vsg/vhdlFile/classify/conditional_signal_assignment.py index 52f2f1e9d..f96dd758f 100644 --- a/vsg/vhdlFile/classify/conditional_signal_assignment.py +++ b/vsg/vhdlFile/classify/conditional_signal_assignment.py @@ -27,11 +27,8 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = conditional_force_assignment.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent +def classify(oDataStructure): + if conditional_force_assignment.detect(oDataStructure): + return None - iCurrent = conditional_waveform_assignment.detect(iToken, lObjects) - - return iCurrent + conditional_waveform_assignment.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/conditional_variable_assignment.py b/vsg/vhdlFile/classify/conditional_variable_assignment.py index 00f7e7c6c..da057031e 100644 --- a/vsg/vhdlFile/classify/conditional_variable_assignment.py +++ b/vsg/vhdlFile/classify/conditional_variable_assignment.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import conditional_variable_assignment as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import conditional_expressions +from vsg.vhdlFile.classify import conditional_expressions, utils @decorators.print_classifier_debug_info(__name__) @@ -22,22 +21,12 @@ def detect(oDataStructure): return False -# if utils.is_next_token_one_of(["when", "if", "elsif", "else"], iToken, lObjects): -# return False -# if utils.find_in_range(":=", iToken, ";", lObjects): -# if not utils.find_in_range("with", iToken, ";", lObjects): -# if utils.find_in_range("when", iToken, ";", lObjects): -# return True -# return False - - @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_tokens_until(":=", token.target, iToken, lObjects) - iCurrent = utils.assign_next_token_required(":=", token.assignment, iCurrent, lObjects) +def classify(oDataStructure): + utils.assign_tokens_until(":=", token.target, oDataStructure) - iCurrent = conditional_expressions.classify_until([";"], iCurrent, lObjects) + oDataStructure.replace_next_token_required(":=", token.assignment) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + conditional_expressions.classify_until([";"], oDataStructure) - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/force_mode.py b/vsg/vhdlFile/classify/force_mode.py index 107f74e56..590512db6 100644 --- a/vsg/vhdlFile/classify/force_mode.py +++ b/vsg/vhdlFile/classify/force_mode.py @@ -2,17 +2,15 @@ from vsg import decorators from vsg.token import force_mode as token -from vsg.vhdlFile import utils +# TODO: Split detect into detect and classify @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ force_mode ::= in | out """ - iCurrent = utils.assign_next_token_if("in", token.in_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("out", token.out_keyword, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_with_if("in", token.in_keyword) + oDataStructure.replace_next_token_with_if("out", token.out_keyword) From 3d3f9249810b986d892d8dd7ff53ef5f4cdbe5db Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Fri, 28 Mar 2025 19:17:24 -0500 Subject: [PATCH 052/124] Constant rules passing. --- vsg/data_structure.py | 9 +++++++-- vsg/vhdlFile/classify/array_constraint.py | 3 +-- vsg/vhdlFile/classify/discrete_range.py | 11 ++++++++--- vsg/vhdlFile/classify/index_constraint.py | 2 +- vsg/vhdlFile/classify/range.py | 8 ++++++-- vsg/vhdlFile/classify/record_constraint.py | 14 ++++++-------- vsg/vhdlFile/classify/record_element_constraint.py | 8 +++----- 7 files changed, 32 insertions(+), 23 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 770f18dc7..4e30d2e08 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -49,6 +49,9 @@ def are_next_consecutive_tokens(self, lTokens): self.increment_seek_index() return True + def at_end_of_file(self): + return self.iCurrent == self.iEndIndex + def current_token_lower_value_is(self, sString): return self.get_current_token_lower_value() == sString @@ -64,8 +67,8 @@ def does_string_exist_before_string(self, sFirst, sSecond): if oToken.lower_value == sFirst: return True - def does_string_exist_before_matching_close_parenthesis(self, sString): - iParen = 0 + def does_string_exist_before_matching_close_parenthesis(self, sString, myParen=0): + iParen = myParen for oToken in self.lAllObjects[self.iSeek : :]: if iParen == 0 and oToken.lower_value == sString: return True @@ -73,6 +76,8 @@ def does_string_exist_before_matching_close_parenthesis(self, sString): iParen += 1 elif oToken.lower_value == ")": iParen -= 1 + if iParen == -1: + return False return False def does_string_exist_before_string_honoring_parenthesis_hierarchy(self, sFirst, sSecond): diff --git a/vsg/vhdlFile/classify/array_constraint.py b/vsg/vhdlFile/classify/array_constraint.py index 2bfd45806..4718045f1 100644 --- a/vsg/vhdlFile/classify/array_constraint.py +++ b/vsg/vhdlFile/classify/array_constraint.py @@ -15,6 +15,7 @@ def detect(oDataStructure): """ if open_detected(oDataStructure): classify_open(oDataStructure) + array_element_constraint.detect(oDataStructure) return True if index_constraint.detect(oDataStructure): index_constraint.classify(oDataStructure) @@ -41,5 +42,3 @@ def classify_open(oDataStructure): oDataStructure.replace_next_token_with(token.open_parenthesis) oDataStructure.replace_next_token_with(token.open_keyword) oDataStructure.replace_next_token_required(")", token.close_parenthesis) - - array_element_constraint.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/discrete_range.py b/vsg/vhdlFile/classify/discrete_range.py index 4cb451fc3..75f1aee47 100644 --- a/vsg/vhdlFile/classify/discrete_range.py +++ b/vsg/vhdlFile/classify/discrete_range.py @@ -32,15 +32,20 @@ def classify_until(lUntils, oDataStructure): iOpenParenthesis = 0 iCloseParenthesis = 0 - while not oDataStructure.is_next_token_one_of(lUntils): - # if iCurrent == iPrevious: - # utils.print_missing_error_message(lUntils, iToken, lObjects) + while not oDataStructure.at_end_of_file(): + oDataStructure.advance_to_next_token() if oDataStructure.current_token_lower_value_is("("): iOpenParenthesis += 1 elif oDataStructure.current_token_lower_value_is(")"): iCloseParenthesis += 1 + if iOpenParenthesis < iCloseParenthesis: break + elif iOpenParenthesis == iCloseParenthesis: + if oDataStructure.is_next_token_one_of(lUntils): + break + else: + oDataStructure.replace_current_token_with(parser.todo) else: oDataStructure.replace_current_token_with(parser.todo) diff --git a/vsg/vhdlFile/classify/index_constraint.py b/vsg/vhdlFile/classify/index_constraint.py index d585ba4d9..cc56a2d11 100644 --- a/vsg/vhdlFile/classify/index_constraint.py +++ b/vsg/vhdlFile/classify/index_constraint.py @@ -11,7 +11,7 @@ def detect(oDataStructure): index_constraint ::= ( discrete_range { , discrete_range } ) """ - oDataStructure.align_seek_index() + oDataStructure.align_seek_index() # TODO: Is this necessary? if oDataStructure.is_next_seek_token("("): oDataStructure.increment_seek_index() if discrete_range.detect(oDataStructure): diff --git a/vsg/vhdlFile/classify/range.py b/vsg/vhdlFile/classify/range.py index 425665035..a6167a52c 100644 --- a/vsg/vhdlFile/classify/range.py +++ b/vsg/vhdlFile/classify/range.py @@ -13,15 +13,19 @@ def detect(oDataStructure): """ if oDataStructure.are_next_consecutive_tokens(["(", None, ")"]): return True + # TODO: move mySeek into oDataStructure + mySeek = oDataStructure.iSeek if attribute_name.detect(oDataStructure): return True + oDataStructure.iSeek = mySeek return detect_direction(oDataStructure) @decorators.print_classifier_debug_info(__name__) def detect_direction(oDataStructure): - if oDataStructure.does_string_exist_before_matching_close_parenthesis("downto"): + # oDataStructure.align_seek_index() + if oDataStructure.does_string_exist_before_matching_close_parenthesis("downto", 0): return True - if oDataStructure.does_string_exist_before_matching_close_parenthesis("to"): + if oDataStructure.does_string_exist_before_matching_close_parenthesis("to", 0): return True return False diff --git a/vsg/vhdlFile/classify/record_constraint.py b/vsg/vhdlFile/classify/record_constraint.py index ed9c1cdea..15f5c1eba 100644 --- a/vsg/vhdlFile/classify/record_constraint.py +++ b/vsg/vhdlFile/classify/record_constraint.py @@ -22,12 +22,10 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("(", token.open_parenthesis) - while not utils.is_next_token(")", iCurrent, lObjects): - iCurrent = record_element_constraint.classify(iCurrent, lObjects) - iCurrent = utils.assign_next_token_if(",", token.comma, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) - - return iCurrent + while not oDataStructure.is_next_token(")"): + record_element_constraint.classify(oDataStructure) + oDataStructure.replace_next_token_with_if(",", token.comma) + oDataStructure.replace_next_token_required(")", token.close_parenthesis) diff --git a/vsg/vhdlFile/classify/record_element_constraint.py b/vsg/vhdlFile/classify/record_element_constraint.py index b2fc3e52b..7f7089a80 100644 --- a/vsg/vhdlFile/classify/record_element_constraint.py +++ b/vsg/vhdlFile/classify/record_element_constraint.py @@ -20,8 +20,6 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token(token.record_element_simple_name, iToken, lObjects) - iCurrent = element_constraint.detect(iCurrent, lObjects) - - return iCurrent +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.record_element_simple_name) + element_constraint.detect(oDataStructure) From 777a584a868b0766cadc6624d1264408b8ebd64e Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Fri, 28 Mar 2025 19:34:34 -0500 Subject: [PATCH 053/124] contrained_array_definition tests pass. --- .../classify/constrained_array_definition.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/vsg/vhdlFile/classify/constrained_array_definition.py b/vsg/vhdlFile/classify/constrained_array_definition.py index 2afc64078..f6d5e2ed5 100644 --- a/vsg/vhdlFile/classify/constrained_array_definition.py +++ b/vsg/vhdlFile/classify/constrained_array_definition.py @@ -15,18 +15,17 @@ def detect(oDataStructure): if oDataStructure.is_next_token("array"): if not oDataStructure.does_string_exist_in_next_n_tokens("<>", 5): + classify(oDataStructure) return True return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("array", token.array_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.array_keyword) - iCurrent = index_constraint.classify(iToken, lObjects) + index_constraint.classify(oDataStructure) - iCurrent = utils.assign_next_token_required("of", token.of_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("of", token.of_keyword) - iCurrent = subtype_indication.classify(iCurrent, lObjects) - - return iCurrent + subtype_indication.classify(oDataStructure) From 753ad41e9043f5dd184ab96c3140343423518d92 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Fri, 28 Mar 2025 19:45:26 -0500 Subject: [PATCH 054/124] delay_machanism tests pass. --- vsg/vhdlFile/classify/delay_mechanism.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/vsg/vhdlFile/classify/delay_mechanism.py b/vsg/vhdlFile/classify/delay_mechanism.py index 9ba461abc..ac7aacb34 100644 --- a/vsg/vhdlFile/classify/delay_mechanism.py +++ b/vsg/vhdlFile/classify/delay_mechanism.py @@ -20,16 +20,13 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - if utils.is_next_token("transport", iToken, lObjects): - return utils.assign_next_token_required("transport", token.transport_keyword, iToken, lObjects) +def classify(oDataStructure): + if oDataStructure.is_next_token("transport"): + oDataStructure.replace_next_token_with(token.transport_keyword) else: - iCurrent = iToken + if oDataStructure.is_next_token("reject"): + oDataStructure.replace_next_token_with(token.reject_keyword) + expression.classify_until(["inertial"], oDataStructure) - if utils.is_next_token("reject", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("reject", token.reject_keyword, iCurrent, lObjects) - iCurrent = expression.classify_until(["inertial"], iCurrent, lObjects) - - iCurrent = utils.assign_next_token_required("inertial", token.inertial_keyword, iCurrent, lObjects) - return iCurrent + oDataStructure.replace_next_token_required("inertial", token.inertial_keyword) From a093e2bedc46d16876e0b3865cc41331bcff07f7 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Fri, 28 Mar 2025 20:22:12 -0500 Subject: [PATCH 055/124] exit rules passing. --- vsg/data_structure.py | 2 ++ vsg/token/exit_statement.py | 2 +- vsg/vhdlFile/classify/exit_statement.py | 19 ++++++++--------- vsg/vhdlFile/classify/iteration_scheme.py | 18 +++++++--------- vsg/vhdlFile/classify/loop_statement.py | 25 ++++++++++------------- 5 files changed, 30 insertions(+), 36 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 4e30d2e08..15fc49bb2 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -41,10 +41,12 @@ def align_seek_index(self): def are_next_consecutive_tokens(self, lTokens): self.align_seek_index() + myIndex = self.iSeek for sToken in lTokens: self.seek_to_next_token() if sToken is not None: if not self.seek_token_lower_value_is(sToken): + self.iSeek = myIndex return False self.increment_seek_index() return True diff --git a/vsg/token/exit_statement.py b/vsg/token/exit_statement.py index 1d6d99af4..ed50c9bc2 100644 --- a/vsg/token/exit_statement.py +++ b/vsg/token/exit_statement.py @@ -17,7 +17,7 @@ class label_colon(parser.label_colon): unique_id = exit_statement : label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() diff --git a/vsg/vhdlFile/classify/exit_statement.py b/vsg/vhdlFile/classify/exit_statement.py index bec9f2372..78c3f1e35 100644 --- a/vsg/vhdlFile/classify/exit_statement.py +++ b/vsg/vhdlFile/classify/exit_statement.py @@ -19,17 +19,16 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.label, token.label_colon) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.label, token.label_colon) - iCurrent = utils.assign_next_token_required("exit", token.exit_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("exit", token.exit_keyword) - iCurrent = utils.assign_next_token_if_not_one_of([";", "when"], token.loop_label, iCurrent, lObjects) + if not oDataStructure.is_next_token_one_of([";", "when"]): + oDataStructure.replace_next_token_with(token.loop_label) - if utils.is_next_token("when", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("when", token.when_keyword, iCurrent, lObjects) - iCurrent = condition.classify_until([";"], iCurrent, lObjects) + if oDataStructure.is_next_token("when"): + oDataStructure.replace_next_token_with(token.when_keyword) + condition.classify_until([";"], oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/iteration_scheme.py b/vsg/vhdlFile/classify/iteration_scheme.py index 7b1424d58..6915e3660 100644 --- a/vsg/vhdlFile/classify/iteration_scheme.py +++ b/vsg/vhdlFile/classify/iteration_scheme.py @@ -25,15 +25,11 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - if utils.is_next_token("while", iToken, lObjects): - iCurrent = utils.assign_next_token_required("while", token.while_keyword, iToken, lObjects) - iCurrent = condition.classify_until(["loop"], iToken, lObjects) - return iCurrent +def classify(oDataStructure): + if oDataStructure.is_next_token("while"): + oDataStructure.replace_next_token_required("while", token.while_keyword) + condition.classify_until(["loop"], oDataStructure) - if utils.is_next_token("for", iToken, lObjects): - iCurrent = utils.assign_next_token_required("for", token.for_keyword, iToken, lObjects) - iCurrent = parameter_specification.classify_until(["loop"], iToken, lObjects) - return iCurrent - - return iToken + if oDataStructure.is_next_token("for"): + oDataStructure.replace_next_token_required("for", token.for_keyword) + parameter_specification.classify_until(["loop"], oDataStructure) diff --git a/vsg/vhdlFile/classify/loop_statement.py b/vsg/vhdlFile/classify/loop_statement.py index 3928aa5ab..ac3eb6a89 100644 --- a/vsg/vhdlFile/classify/loop_statement.py +++ b/vsg/vhdlFile/classify/loop_statement.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import loop_statement as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import iteration_scheme, sequence_of_statements +from vsg.vhdlFile.classify import iteration_scheme, sequence_of_statements, utils @decorators.print_classifier_debug_info(__name__) @@ -16,7 +15,7 @@ def detect(oDataStructure): end loop [ loop_label ] ; """ oDataStructure.align_seek_index() - if oDataStructure.does_string_exist_in_next_n_tokens(":", 2): + if oDataStructure.are_next_consecutive_tokens([None, ":"]): oDataStructure.increment_seek_index() oDataStructure.advance_to_next_seek_token() oDataStructure.increment_seek_index() @@ -31,18 +30,16 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.loop_label, token.label_colon) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.loop_label, token.label_colon) - iCurrent = iteration_scheme.classify(iCurrent, lObjects) + iteration_scheme.classify(oDataStructure) - iCurrent = utils.assign_next_token_required("loop", token.loop_keyword, iCurrent, lObjects) + oDataStructure.replace_next_token_required("loop", token.loop_keyword) - iCurrent = sequence_of_statements.detect(iCurrent, lObjects) + sequence_of_statements.detect(oDataStructure, "end") - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("loop", token.end_loop_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.end_loop_label, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_required("loop", token.end_loop_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.end_loop_label) + oDataStructure.replace_next_token_required(";", token.semicolon) From 6337568647ef612464690e1754bfc998fca2a6a6 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Fri, 28 Mar 2025 21:24:12 -0500 Subject: [PATCH 056/124] external_constant_name rules pass. --- .../classify/external_constant_name.py | 22 +++++++++---------- vsg/vhdlFile/classify/external_signal_name.py | 20 ++++++++--------- .../classify/external_variable_name.py | 20 ++++++++--------- 3 files changed, 28 insertions(+), 34 deletions(-) diff --git a/vsg/vhdlFile/classify/external_constant_name.py b/vsg/vhdlFile/classify/external_constant_name.py index 282e29c09..0129128ce 100644 --- a/vsg/vhdlFile/classify/external_constant_name.py +++ b/vsg/vhdlFile/classify/external_constant_name.py @@ -20,19 +20,17 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("<<", token.double_less_than, iToken, lObjects) - iCurrent = utils.assign_next_token_required("constant", token.constant_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.external_pathname, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.double_less_than) + oDataStructure.replace_next_token_with(token.constant_keyword) + oDataStructure.replace_next_token_with(token.external_pathname) - while utils.is_next_token("(", iCurrent, lObjects): - iCurrent = utils.assign_parenthesis_as_todo(iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(":", token.external_pathname, iCurrent, lObjects) + while oDataStructure.is_next_token("("): + utils.assign_parenthesis_as_todo(oDataStructure) + oDataStructure.replace_next_token_with_if_not(":", token.external_pathname) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) + oDataStructure.replace_next_token_required(":", token.colon) - iCurrent = subtype_indication.classify(iCurrent, lObjects) + subtype_indication.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(">>", token.double_greater_than, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(">>", token.double_greater_than) diff --git a/vsg/vhdlFile/classify/external_signal_name.py b/vsg/vhdlFile/classify/external_signal_name.py index 60b92164e..1df778f7e 100644 --- a/vsg/vhdlFile/classify/external_signal_name.py +++ b/vsg/vhdlFile/classify/external_signal_name.py @@ -20,19 +20,17 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("<<", token.double_less_than, iToken, lObjects) - iCurrent = utils.assign_next_token_required("signal", token.signal_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token(token.external_pathname, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.double_less_than) + oDataStructure.replace_next_token_with(token.signal_keyword) + oDataStructure.replace_next_token_with(token.external_pathname) - while utils.is_next_token("(", iCurrent, lObjects): + while oDataStructure.is_next_token("("): iCurrent = utils.assign_parenthesis_as_todo(iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(":", token.external_pathname, iCurrent, lObjects) + oDataStructure.replace_next_token_with_if_not(":", token.external_pathname) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) + oDataStructure.replace_next_token_required(":", token.colon) - iCurrent = subtype_indication.classify(iCurrent, lObjects) + subtype_indication.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(">>", token.double_greater_than, iToken, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(">>", token.double_greater_than) diff --git a/vsg/vhdlFile/classify/external_variable_name.py b/vsg/vhdlFile/classify/external_variable_name.py index 030909ab3..5b426d6e8 100644 --- a/vsg/vhdlFile/classify/external_variable_name.py +++ b/vsg/vhdlFile/classify/external_variable_name.py @@ -20,19 +20,17 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("<<", token.double_less_than, iToken, lObjects) - iCurrent = utils.assign_next_token_required("variable", token.variable_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token(token.external_pathname, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.double_less_than) + oDataStructure.replace_next_token_with(token.variable_keyword) + oDataStructure.replace_next_token_with(token.external_pathname) - while utils.is_next_token("(", iCurrent, lObjects): + while oDataStructure.is_next_token("("): iCurrent = utils.assign_parenthesis_as_todo(iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(":", token.external_pathname, iCurrent, lObjects) + oDataStructure.replace_next_token_with_if_not(":", token.external_pathname) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) + oDataStructure.replace_next_token_required(":", token.colon) - iCurrent = subtype_indication.classify(iCurrent, lObjects) + subtype_indication.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(">>", token.double_greater_than, iToken, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(">>", token.double_greater_than) From c45435b7dd2d2557a080fcc2ca7a82f7a504d2d3 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Fri, 28 Mar 2025 21:28:46 -0500 Subject: [PATCH 057/124] file_type_defintion tests pass. --- vsg/vhdlFile/classify/file_type_definition.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/vsg/vhdlFile/classify/file_type_definition.py b/vsg/vhdlFile/classify/file_type_definition.py index 00587747e..f55aa66c4 100644 --- a/vsg/vhdlFile/classify/file_type_definition.py +++ b/vsg/vhdlFile/classify/file_type_definition.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import file_type_definition as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import type_mark @@ -21,10 +20,8 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("file", token.file_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("of", token.of_keyword, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.file_keyword) + oDataStructure.replace_next_token_required("of", token.of_keyword) - iCurrent = type_mark.classify(iToken, lObjects) - - return iCurrent + type_mark.classify(oDataStructure) From 08d36596f38b797c9b29359eaf56bbb0193b5d90 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Fri, 28 Mar 2025 22:06:02 -0500 Subject: [PATCH 058/124] function rules pass. --- .../conditional_waveform_assignment.py | 30 +++++++++---------- .../interface_constant_declaration.py | 2 +- .../classify/interface_file_declaration.py | 12 ++++---- vsg/vhdlFile/classify/next_statement.py | 20 ++++++------- .../classify/subprogram_declarative_item.py | 3 +- 5 files changed, 30 insertions(+), 37 deletions(-) diff --git a/vsg/vhdlFile/classify/conditional_waveform_assignment.py b/vsg/vhdlFile/classify/conditional_waveform_assignment.py index 181dab5a5..0937a183a 100644 --- a/vsg/vhdlFile/classify/conditional_waveform_assignment.py +++ b/vsg/vhdlFile/classify/conditional_waveform_assignment.py @@ -2,34 +2,32 @@ from vsg import decorators from vsg.token import conditional_waveform_assignment as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import conditional_waveforms, delay_mechanism +from vsg.vhdlFile.classify import conditional_waveforms, delay_mechanism, utils @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ conditional_waveform_assignment ::= target <= [ delay_mechanism ] conditional_waveforms ; """ - if utils.is_next_token_one_of(["when", "if", "elsif", "else"], iToken, lObjects): + if oDataStructure.is_next_token_one_of(["when", "if", "elsif", "else"]): return False - if utils.find_in_range("<=", iToken, ";", lObjects): # - if not utils.find_in_range("force", iToken, ";", lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.does_string_exist_before_string("<=", ";"): + if not oDataStructure.does_string_exist_before_string("force", ";"): + classify(oDataStructure) + return True + return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_tokens_until("<=", token.target, iToken, lObjects) - iCurrent = utils.assign_next_token_required("<=", token.assignment, iCurrent, lObjects) +def classify(oDataStructure): + utils.assign_tokens_until("<=", token.target, oDataStructure) + oDataStructure.replace_next_token_required("<=", token.assignment) - iCurrent = delay_mechanism.detect(iCurrent, lObjects) + delay_mechanism.detect(oDataStructure) - iCurrent = conditional_waveforms.classify_until([";"], iToken, lObjects) + conditional_waveforms.classify_until([";"], oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/interface_constant_declaration.py b/vsg/vhdlFile/classify/interface_constant_declaration.py index 47f55d01d..0e75e47d6 100644 --- a/vsg/vhdlFile/classify/interface_constant_declaration.py +++ b/vsg/vhdlFile/classify/interface_constant_declaration.py @@ -29,4 +29,4 @@ def classify(oDataStructure): if oDataStructure.is_next_token(":="): oDataStructure.replace_next_token_with(token.assignment) - expression.classify_until([";"], oDatStructure) + expression.classify_until([";"], oDataStructure) diff --git a/vsg/vhdlFile/classify/interface_file_declaration.py b/vsg/vhdlFile/classify/interface_file_declaration.py index 00375488b..841a68c32 100644 --- a/vsg/vhdlFile/classify/interface_file_declaration.py +++ b/vsg/vhdlFile/classify/interface_file_declaration.py @@ -17,13 +17,11 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("file", token.file_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.file_keyword) - iCurrent = identifier_list.classify_until([":"], iCurrent, lObjects, token.identifier) + identifier_list.classify_until([":"], oDataStructure, token.identifier) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) + oDataStructure.replace_next_token_required(":", token.colon) - iCurrent = subtype_indication.classify(iCurrent, lObjects) - - return iCurrent + subtype_indication.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/next_statement.py b/vsg/vhdlFile/classify/next_statement.py index c67cf109c..15345287c 100644 --- a/vsg/vhdlFile/classify/next_statement.py +++ b/vsg/vhdlFile/classify/next_statement.py @@ -18,17 +18,15 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.label, token.label_colon) - iCurrent = utils.assign_next_token_required("next", token.next_keyword, iCurrent, lObjects) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.label, token.label_colon) + oDataStructure.replace_next_token_required("next", token.next_keyword) - if not utils.is_next_token(";", iCurrent, lObjects) and not utils.is_next_token("when", iCurrent, lObjects): - iCurrent = utils.assign_next_token(token.loop_label, iCurrent, lObjects) + if not oDataStructure.is_next_token(";") and not oDataStructure.is_next_token("when"): + utils.assign_next_token(token.loop_label, oDataStructure) - if utils.is_next_token("when", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("when", token.when_keyword, iCurrent, lObjects) - iCurrent = condition.classify_until([";"], iCurrent, lObjects) + if oDataStructure.is_next_token("when"): + oDataStructure.replace_next_token_required("when", token.when_keyword) + condition.classify_until([";"], oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/subprogram_declarative_item.py b/vsg/vhdlFile/classify/subprogram_declarative_item.py index f56c55436..248f2883c 100644 --- a/vsg/vhdlFile/classify/subprogram_declarative_item.py +++ b/vsg/vhdlFile/classify/subprogram_declarative_item.py @@ -45,7 +45,7 @@ def detect(oDataStructure): if subprogram_declaration.detect(oDataStructure): if subprogram_body.detect(oDataStructure): - subprogram_body.classify(oDataStructure) + return True return True if subprogram_instantiation_declaration.detect(oDataStructure): @@ -81,7 +81,6 @@ def detect(oDataStructure): return True if alias_declaration.detect(oDataStructure): - alias_declaration.classify(oDataStructure) return True if attribute_declaration.detect(oDataStructure): From 4424960adc103bb9541200ec8d6568a7df5ae6a7 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 29 Mar 2025 07:55:22 -0500 Subject: [PATCH 059/124] generate rules pass. --- vsg/vhdlFile/classify/generate_statement_body.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vsg/vhdlFile/classify/generate_statement_body.py b/vsg/vhdlFile/classify/generate_statement_body.py index 9179d4d8d..b1f92cd96 100644 --- a/vsg/vhdlFile/classify/generate_statement_body.py +++ b/vsg/vhdlFile/classify/generate_statement_body.py @@ -14,11 +14,15 @@ def classify(oDataStructure): { concurrent_statement } [ end [ alternative_label ] ; ] """ - if block_declarative_part.detect(oDataStructure): - oDataStructure.replace_next_token_required("begin", token.begin_keyword) + block_declarative_part.detect(oDataStructure) + + oDataStructure.replace_next_token_with_if("begin", token.begin_keyword) + + # TODO: push while loop into concurrent_statement.detect while not oDataStructure.is_next_token_one_of(["elsif", "else", "when", "end"]): - concurrent_statement.detect(oDataStructure) + if not concurrent_statement.detect(oDataStructure): + break if oDataStructure.is_next_token("end"): if not oDataStructure.are_next_consecutive_tokens(["end", "generate"]): From 6333eeadb546864f00e2fb9333a0a641170627f9 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 29 Mar 2025 08:01:52 -0500 Subject: [PATCH 060/124] generic rules pass. --- .../interface_function_specification.py | 26 +++++++++---------- .../interface_incomplete_type_declaration.py | 8 +++--- .../interface_procedure_specification.py | 18 ++++++------- 3 files changed, 23 insertions(+), 29 deletions(-) diff --git a/vsg/vhdlFile/classify/interface_function_specification.py b/vsg/vhdlFile/classify/interface_function_specification.py index aa1364c61..c195143a8 100644 --- a/vsg/vhdlFile/classify/interface_function_specification.py +++ b/vsg/vhdlFile/classify/interface_function_specification.py @@ -18,21 +18,19 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_if("pure", token.pure_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("impure", token.impure_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("function", token.function_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token(token.designator, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if("parameter", token.parameter_keyword, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with_if("pure", token.pure_keyword) + oDataStructure.replace_next_token_with_if("impure", token.impure_keyword) + oDataStructure.replace_next_token_required("function", token.function_keyword) + oDataStructure.replace_next_token_with(token.designator) + oDataStructure.replace_next_token_with_if("parameter", token.parameter_keyword) - if utils.is_next_token("(", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) + if oDataStructure.is_next_token("("): + oDataStructure.replace_next_token_with(token.open_parenthesis) - iCurrent = formal_parameter_list.classify(iCurrent, lObjects) + formal_parameter_list.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) + oDataStructure.replace_next_token_required(")", token.close_parenthesis) - iCurrent = utils.assign_next_token_required("return", token.return_keyword, iToken, lObjects) - iCurrent = type_mark.classify(iToken, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("return", token.return_keyword) + type_mark.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py b/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py index ee6fa5e7c..624799974 100644 --- a/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py +++ b/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py @@ -16,8 +16,6 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_if("type", token.type_keyword, iToken, lObjects) - iCurrent = identifier.classify(iCurrent, lObjects) - - return iCurrent +def classify(oDataStructure): + oDataStructure.replace_next_token_with_if("type", token.type_keyword) + identifier.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/interface_procedure_specification.py b/vsg/vhdlFile/classify/interface_procedure_specification.py index ce4672d6f..b0eac8a9a 100644 --- a/vsg/vhdlFile/classify/interface_procedure_specification.py +++ b/vsg/vhdlFile/classify/interface_procedure_specification.py @@ -17,14 +17,12 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("procedure", token.procedure_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token(token.designator, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if("parameter", token.parameter_keyword, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.procedure_keyword) + oDataStructure.replace_next_token_with(token.designator) + oDataStructure.replace_next_token_with_if("parameter", token.parameter_keyword) - if utils.is_next_token("(", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) - iCurrent = formal_parameter_list.classify(iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) - - return iCurrent + if oDataStructure.is_next_token("("): + oDataStructure.replace_next_token_with(token.open_parenthesis) + formal_parameter_list.classify(oDataStructure) + oDataStructure.replace_next_token_required(")", token.close_parenthesis) From 624d2fe6583f61914367072ea4425727eb06208f Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 29 Mar 2025 09:28:15 -0500 Subject: [PATCH 061/124] generic_map rules passing. --- vsg/data_structure.py | 9 +------ vsg/vhdlFile/classify/block_header.py | 3 ++- .../subprogram_instantiation_declaration.py | 24 +++++++++---------- 3 files changed, 14 insertions(+), 22 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 15fc49bb2..6e1b98d79 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -190,16 +190,9 @@ def replace_next_token_with_if_not(self, sString, token): self.replace_current_token_with(token) def replace_tokens_from_current_to_seek_with(self, token): - self.reverse_to_previous_seek_token() while self.get_current_index() < self.get_seek_index(): self.replace_next_token_with(token) - - def reverse_to_previous_seek_token(self): - for iIndex in range(self.iSeek - 1, self.iCurrent, -1): - if type(self.lAllObjects[iIndex]) == parser.item: - self.iSeek = iIndex - return True - return False + self.advance_to_next_token() def seek_to_next_token(self): # jcl - might need to watch out for going past the end of the lAllObjects list diff --git a/vsg/vhdlFile/classify/block_header.py b/vsg/vhdlFile/classify/block_header.py index 58677dd18..b3d822dd6 100644 --- a/vsg/vhdlFile/classify/block_header.py +++ b/vsg/vhdlFile/classify/block_header.py @@ -20,7 +20,8 @@ def detect(oDataStructure): [ port_map_aspect ; ] ] """ - generic_clause.detect(oDataStructure) + if generic_clause.detect(oDataStructure): + generic_clause.classify(oDataStructure) if generic_map_aspect.detect(oDataStructure): oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py b/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py index fe0a6ce7b..87ac5f230 100644 --- a/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py +++ b/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py @@ -15,26 +15,24 @@ def detect(oDataStructure): """ if subprogram_kind.detect(oDataStructure): - if oDataStructure.find_in_next_n_tokens("is", 3): - if oDataStructure.find_in_next_n_tokens("new", 4): + if oDataStructure.does_string_exist_in_next_n_tokens("is", 3): + if oDataStructure.does_string_exist_in_next_n_tokens("new", 4): classify(oDataStructure) return True return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = subprogram_kind.classify(iToken, lObjects) +def classify(oDataStructure): + subprogram_kind.classify(oDataStructure) - iCurrent = utils.assign_next_token(token.identifier, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("new", token.new_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.uninstantiated_subprogram_name, iCurrent, lObjects) + oDataStructure.replace_next_token_with(token.identifier) + oDataStructure.replace_next_token_required("is", token.is_keyword) + oDataStructure.replace_next_token_required("new", token.new_keyword) + oDataStructure.replace_next_token_with(token.uninstantiated_subprogram_name) - iCurrent = signature.detect(iCurrent, lObjects) + signature.detect(oDataStructure) - iCurrent = generic_map_aspect.detect(iCurrent, lObjects) + generic_map_aspect.detect(oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) From ce19d4d76d99d6eedc5df1d3afe44dfe63b166b7 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 29 Mar 2025 09:46:39 -0500 Subject: [PATCH 062/124] if rules passing. --- vsg/token/loop_statement.py | 2 +- vsg/vhdlFile/classify/loop_statement.py | 1 - vsg/vhdlFile/classify/sequence_of_statements.py | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vsg/token/loop_statement.py b/vsg/token/loop_statement.py index db2dedfd8..748a12201 100644 --- a/vsg/token/loop_statement.py +++ b/vsg/token/loop_statement.py @@ -17,7 +17,7 @@ class label_colon(parser.label_colon): unique_id = loop_statement : label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() diff --git a/vsg/vhdlFile/classify/loop_statement.py b/vsg/vhdlFile/classify/loop_statement.py index ac3eb6a89..d985d0361 100644 --- a/vsg/vhdlFile/classify/loop_statement.py +++ b/vsg/vhdlFile/classify/loop_statement.py @@ -18,7 +18,6 @@ def detect(oDataStructure): if oDataStructure.are_next_consecutive_tokens([None, ":"]): oDataStructure.increment_seek_index() oDataStructure.advance_to_next_seek_token() - oDataStructure.increment_seek_index() if oDataStructure.is_next_seek_token("loop"): classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/sequence_of_statements.py b/vsg/vhdlFile/classify/sequence_of_statements.py index 82a3ebef2..a655acfe6 100644 --- a/vsg/vhdlFile/classify/sequence_of_statements.py +++ b/vsg/vhdlFile/classify/sequence_of_statements.py @@ -11,4 +11,5 @@ def detect(oDataStructure, lUnless): { sequential_statement } """ while not oDataStructure.is_next_token_one_of(lUnless): - sequential_statement.detect(oDataStructure) + if not sequential_statement.detect(oDataStructure): + return False From 2527c1a6c6815fbdcbd2a919540baca7c85e2e06 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 29 Mar 2025 11:06:55 -0500 Subject: [PATCH 063/124] library rules passing. --- vsg/data_structure.py | 5 +++-- vsg/vhdlFile/classify/configuration_declaration.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 6e1b98d79..b1888205d 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -46,7 +46,7 @@ def are_next_consecutive_tokens(self, lTokens): self.seek_to_next_token() if sToken is not None: if not self.seek_token_lower_value_is(sToken): - self.iSeek = myIndex + self.align_seek_index() return False self.increment_seek_index() return True @@ -137,7 +137,8 @@ def increment_current_index(self): self.iCurrent += 1 def increment_seek_index(self): - if self.iSeek < self.iEndIndex: + # TODO: find a way to calculate the length of lAllObjects less frequent + if self.iSeek < len(self.lAllObjects) - 1: self.iSeek += 1 else: self.iSeek = self.iEndIndex diff --git a/vsg/vhdlFile/classify/configuration_declaration.py b/vsg/vhdlFile/classify/configuration_declaration.py index ac0c38509..beaee8048 100644 --- a/vsg/vhdlFile/classify/configuration_declaration.py +++ b/vsg/vhdlFile/classify/configuration_declaration.py @@ -45,6 +45,6 @@ def classify_opening_declaration(oDataStructure): @decorators.print_classifier_debug_info(__name__) def classify_closing_declaration(oDataStructure): oDataStructure.replace_next_token_required("end", token.end_keyword) - oDataStructure.replace_next_token_if("configuration", token.end_configuration_keyword) - oDataStructure.replace_next_token_if_not(";", token.configuration_simple_name) + oDataStructure.replace_next_token_with_if("configuration", token.end_configuration_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.configuration_simple_name) oDataStructure.replace_next_token_required(";", token.semicolon) From f14e71dd8d844125b14b66706c991fe65ead34a6 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 29 Mar 2025 11:27:09 -0500 Subject: [PATCH 064/124] loop_statement rules passing. --- vsg/data_structure.py | 1 + vsg/vhdlFile/classify/loop_statement.py | 1 + 2 files changed, 2 insertions(+) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index b1888205d..5ccb83ebe 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -49,6 +49,7 @@ def are_next_consecutive_tokens(self, lTokens): self.align_seek_index() return False self.increment_seek_index() + self.align_seek_index() return True def at_end_of_file(self): diff --git a/vsg/vhdlFile/classify/loop_statement.py b/vsg/vhdlFile/classify/loop_statement.py index d985d0361..ac3eb6a89 100644 --- a/vsg/vhdlFile/classify/loop_statement.py +++ b/vsg/vhdlFile/classify/loop_statement.py @@ -18,6 +18,7 @@ def detect(oDataStructure): if oDataStructure.are_next_consecutive_tokens([None, ":"]): oDataStructure.increment_seek_index() oDataStructure.advance_to_next_seek_token() + oDataStructure.increment_seek_index() if oDataStructure.is_next_seek_token("loop"): classify(oDataStructure) From 6d0a8426e8c78a5dc83fb1800472d01035f3806b Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 29 Mar 2025 11:29:55 -0500 Subject: [PATCH 065/124] next_statement rules passing. --- vsg/token/next_statement.py | 2 +- vsg/vhdlFile/classify/next_statement.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vsg/token/next_statement.py b/vsg/token/next_statement.py index b49cc44b5..9f29dd178 100644 --- a/vsg/token/next_statement.py +++ b/vsg/token/next_statement.py @@ -17,7 +17,7 @@ class label_colon(parser.label_colon): unique_id = next_statement : label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() diff --git a/vsg/vhdlFile/classify/next_statement.py b/vsg/vhdlFile/classify/next_statement.py index 15345287c..e2564ff6c 100644 --- a/vsg/vhdlFile/classify/next_statement.py +++ b/vsg/vhdlFile/classify/next_statement.py @@ -23,10 +23,10 @@ def classify(oDataStructure): oDataStructure.replace_next_token_required("next", token.next_keyword) if not oDataStructure.is_next_token(";") and not oDataStructure.is_next_token("when"): - utils.assign_next_token(token.loop_label, oDataStructure) + oDataStructure.replace_next_token_with(token.loop_label) if oDataStructure.is_next_token("when"): - oDataStructure.replace_next_token_required("when", token.when_keyword) + oDataStructure.replace_next_token_with(token.when_keyword) condition.classify_until([";"], oDataStructure) oDataStructure.replace_next_token_required(";", token.semicolon) From 8cee9b874e429809f7f349556116fabed2ba3b0c Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 29 Mar 2025 11:32:06 -0500 Subject: [PATCH 066/124] null_statement rules pass. --- vsg/token/null_statement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsg/token/null_statement.py b/vsg/token/null_statement.py index 354c81052..c29e46ffe 100644 --- a/vsg/token/null_statement.py +++ b/vsg/token/null_statement.py @@ -17,7 +17,7 @@ class label_colon(parser.label_colon): unique_id = null_statement : label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() From 11db8899334a52974c28da29de1a4c7408b74280 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 29 Mar 2025 12:52:18 -0500 Subject: [PATCH 067/124] package body rules pass --- vsg/vhdlFile/classify/subprogram_declarative_item.py | 1 - 1 file changed, 1 deletion(-) diff --git a/vsg/vhdlFile/classify/subprogram_declarative_item.py b/vsg/vhdlFile/classify/subprogram_declarative_item.py index 248f2883c..fe010f6af 100644 --- a/vsg/vhdlFile/classify/subprogram_declarative_item.py +++ b/vsg/vhdlFile/classify/subprogram_declarative_item.py @@ -88,7 +88,6 @@ def detect(oDataStructure): return True if attribute_specification.detect(oDataStructure): - attribute_specification.classify(oDataStructure) return True if use_clause.detect(oDataStructure): From 9fa5450f912ed0e4f30a75918b74a71ef5050e07 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 29 Mar 2025 13:03:59 -0500 Subject: [PATCH 068/124] port_map rules passing. --- vsg/vhdlFile/classify/block_header.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vsg/vhdlFile/classify/block_header.py b/vsg/vhdlFile/classify/block_header.py index b3d822dd6..000375f85 100644 --- a/vsg/vhdlFile/classify/block_header.py +++ b/vsg/vhdlFile/classify/block_header.py @@ -26,7 +26,8 @@ def detect(oDataStructure): if generic_map_aspect.detect(oDataStructure): oDataStructure.replace_next_token_required(";", token.semicolon) - port_clause.detect(oDataStructure) + if port_clause.detect(oDataStructure): + port_clause.classify(oDataStructure) if port_map_aspect.detect(oDataStructure): oDataStructure.replace_next_token_required(";", token.semicolon) From e30ba0b496c001b70d9c8ca817c85d93d794dd86 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 30 Mar 2025 09:17:26 -0500 Subject: [PATCH 069/124] procedure_call tests pass. --- vsg/data_structure.py | 11 ++++---- vsg/exceptions.py | 8 ++++++ .../concurrent_procedure_call_statement.py | 2 +- vsg/token/procedure_call_statement.py | 2 +- ...oncurrent_conditional_signal_assignment.py | 1 - .../classify/protected_type_declaration.py | 14 +++++----- .../protected_type_declarative_item.py | 26 ++++++++----------- .../protected_type_declarative_part.py | 6 ++--- .../classify/protected_type_definition.py | 1 - .../classify/subprogram_declarative_item.py | 1 - 10 files changed, 35 insertions(+), 37 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 5ccb83ebe..63a626fd2 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from vsg import parser +from vsg import exceptions, parser from vsg.vhdlFile.classify import utils @@ -29,10 +29,7 @@ def advance_to_next_token(self): def advance_to_next_seek_token(self): for iIndex, oToken in enumerate(self.lAllObjects[self.iSeek : :]): if type(oToken) == parser.item: - if self.iSeek > self.iEndIndex: - self.iSeek = self.iEndIndex - else: - self.iSeek = self.iSeek + iIndex + self.iSeek = self.iSeek + iIndex return True return False @@ -142,7 +139,9 @@ def increment_seek_index(self): if self.iSeek < len(self.lAllObjects) - 1: self.iSeek += 1 else: - self.iSeek = self.iEndIndex + # raise exceptions.IndexedPassedEndOfFile() + # exit() + self.iSeek = len(self.lAllObjects) - 1 def is_next_seek_token(self, sString): self.advance_to_next_seek_token() diff --git a/vsg/exceptions.py b/vsg/exceptions.py index 50708de2a..0f3f9ff0c 100644 --- a/vsg/exceptions.py +++ b/vsg/exceptions.py @@ -23,3 +23,11 @@ def __init__(self, message): def __str__(self): return self.message + + +class IndexedPassedEndOfFile(Exception): + def __init__(self, message): + self.message = message + + def __str__(self): + return self.message diff --git a/vsg/token/concurrent_procedure_call_statement.py b/vsg/token/concurrent_procedure_call_statement.py index cc67fff65..68a7ba800 100644 --- a/vsg/token/concurrent_procedure_call_statement.py +++ b/vsg/token/concurrent_procedure_call_statement.py @@ -17,7 +17,7 @@ class label_colon(parser.label_colon): unique_id = concurrent_procedure_call_statement : label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() diff --git a/vsg/token/procedure_call_statement.py b/vsg/token/procedure_call_statement.py index acdb7fa54..31c89ca93 100644 --- a/vsg/token/procedure_call_statement.py +++ b/vsg/token/procedure_call_statement.py @@ -17,7 +17,7 @@ class label_colon(parser.label_colon): unique_id = procedure_call_statement : label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() diff --git a/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py b/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py index 9c5b5cf19..d2e84f74e 100644 --- a/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py +++ b/vsg/vhdlFile/classify/concurrent_conditional_signal_assignment.py @@ -23,7 +23,6 @@ def detect(oDataStructure): """ bAssignmentFound = False - oDataStructure.align_seek_index() while not oDataStructure.seek_token_lower_value_is(";"): if bAssignmentFound: if oDataStructure.seek_token_lower_value_is("when"): diff --git a/vsg/vhdlFile/classify/protected_type_declaration.py b/vsg/vhdlFile/classify/protected_type_declaration.py index e421deae6..958a16603 100644 --- a/vsg/vhdlFile/classify/protected_type_declaration.py +++ b/vsg/vhdlFile/classify/protected_type_declaration.py @@ -23,13 +23,11 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("protected", token.protected_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("protected", token.protected_keyword) - iCurrent = protected_type_declarative_part.detect(iCurrent, lObjects) + protected_type_declarative_part.detect(oDataStructure) - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("protected", token.end_protected_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.protected_type_simple_name, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_required("protected", token.end_protected_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.protected_type_simple_name) diff --git a/vsg/vhdlFile/classify/protected_type_declarative_item.py b/vsg/vhdlFile/classify/protected_type_declarative_item.py index 82849ddc9..b603d4166 100644 --- a/vsg/vhdlFile/classify/protected_type_declarative_item.py +++ b/vsg/vhdlFile/classify/protected_type_declarative_item.py @@ -11,7 +11,7 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ protected_type_declarative_item ::= subprogram_declaration @@ -20,21 +20,17 @@ def detect(iToken, lObjects): | use_clause """ - iReturn = subprogram_declaration.detect(iToken, lObjects) - if iReturn != iToken: - iReturn = subprogram_body.detect(iReturn, lObjects) - return iReturn + if subprogram_declaration.detect(oDataStructure): + subprogram_body.detect(oDataStructure) + return True - iReturn = subprogram_instantiation_declaration.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if subprogram_instantiation_declaration.detect(oDataStructure): + return True - iReturn = attribute_specification.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if attribute_specification.detect(oDataStructure): + return True - iReturn = use_clause.detect(iToken, lObjects) - if iReturn != iToken: - return iReturn + if use_clause.detect(oDataStructure): + return True - return iToken + return False diff --git a/vsg/vhdlFile/classify/protected_type_declarative_part.py b/vsg/vhdlFile/classify/protected_type_declarative_part.py index 0a6c59776..719a5fb7a 100644 --- a/vsg/vhdlFile/classify/protected_type_declarative_part.py +++ b/vsg/vhdlFile/classify/protected_type_declarative_part.py @@ -1,15 +1,15 @@ # -*- coding: utf-8 -*- from vsg import decorators -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import protected_type_declarative_item @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ protected_type_declarative_part ::= { protected_type_declarative_item } """ - return utils.detect_submodule(iToken, lObjects, protected_type_declarative_item) + while protected_type_declarative_item.detect(oDataStructure): + pass diff --git a/vsg/vhdlFile/classify/protected_type_definition.py b/vsg/vhdlFile/classify/protected_type_definition.py index 2085c7844..2d6a50994 100644 --- a/vsg/vhdlFile/classify/protected_type_definition.py +++ b/vsg/vhdlFile/classify/protected_type_definition.py @@ -13,7 +13,6 @@ def detect(oDataStructure): """ if protected_type_declaration.detect(oDataStructure): - protected_type_declaration.classify(oDataStructure) return True if protected_type_body.detect(oDataStructure): diff --git a/vsg/vhdlFile/classify/subprogram_declarative_item.py b/vsg/vhdlFile/classify/subprogram_declarative_item.py index fe010f6af..5219822c5 100644 --- a/vsg/vhdlFile/classify/subprogram_declarative_item.py +++ b/vsg/vhdlFile/classify/subprogram_declarative_item.py @@ -91,7 +91,6 @@ def detect(oDataStructure): return True if use_clause.detect(oDataStructure): - use_clause.classify(oDataStructure) return True return False From aa12c33a225e18235ed5e42419ff5c9bb74a4aeb Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 30 Mar 2025 09:24:26 -0500 Subject: [PATCH 070/124] process rules pass. --- .../classify/simple_force_assignment.py | 19 ++++++++----------- .../classify/simple_release_assignment.py | 17 +++++++---------- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/vsg/vhdlFile/classify/simple_force_assignment.py b/vsg/vhdlFile/classify/simple_force_assignment.py index 2c5f0fbc9..d8015e8c8 100644 --- a/vsg/vhdlFile/classify/simple_force_assignment.py +++ b/vsg/vhdlFile/classify/simple_force_assignment.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import simple_force_assignment as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import expression, force_mode +from vsg.vhdlFile.classify import expression, force_mode, utils @decorators.print_classifier_debug_info(__name__) @@ -21,14 +20,12 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_tokens_until("<=", token.target, iToken, lObjects) - iCurrent = utils.assign_next_token_required("<=", token.assignment, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("force", token.force_keyword, iCurrent, lObjects) +def classify(oDataStructure): + utils.assign_tokens_until("<=", token.target, oDataStructure) + oDataStructure.replace_next_token_required("<=", token.assignment) + oDataStructure.replace_next_token_required("force", token.force_keyword) - iCurrent = force_mode.detect(iCurrent, lObjects) - iCurrent = expression.classify_until([";"], iCurrent, lObjects) + force_mode.detect(oDataStructure) + expression.classify_until([";"], oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/simple_release_assignment.py b/vsg/vhdlFile/classify/simple_release_assignment.py index 97b3e3fe5..881428c31 100644 --- a/vsg/vhdlFile/classify/simple_release_assignment.py +++ b/vsg/vhdlFile/classify/simple_release_assignment.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import simple_release_assignment as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import force_mode +from vsg.vhdlFile.classify import force_mode, utils @decorators.print_classifier_debug_info(__name__) @@ -17,13 +16,11 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_tokens_until("<=", token.target, iToken, lObjects) - iCurrent = utils.assign_next_token_required("<=", token.assignment, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("release", token.release_keyword, iCurrent, lObjects) +def classify(oDataStructure): + utils.assign_tokens_until("<=", token.target, oDataStructure) + oDataStructure.replace_next_token_required("<=", token.assignment) + oDataStructure.replace_next_token_required("release", token.release_keyword) - iCurrent = force_mode.detect(iCurrent, lObjects) + force_mode.detect(oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) From f93e63b225cd9f0f1976d0b9a5d86700323cc94f Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 30 Mar 2025 09:27:58 -0500 Subject: [PATCH 071/124] protected_type_body tests pass. --- vsg/vhdlFile/classify/protected_type_body_declarative_item.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vsg/vhdlFile/classify/protected_type_body_declarative_item.py b/vsg/vhdlFile/classify/protected_type_body_declarative_item.py index ed95d16c7..441727f65 100644 --- a/vsg/vhdlFile/classify/protected_type_body_declarative_item.py +++ b/vsg/vhdlFile/classify/protected_type_body_declarative_item.py @@ -44,8 +44,7 @@ def detect(oDataStructure): """ if subprogram_declaration.detect(oDataStructure): - if subprogram_body.detect(iReturn, lObjects): - return True + subprogram_body.detect(oDataStructure) return True if subprogram_instantiation_declaration.detect(oDataStructure): From 0348f15f95c92d98cf122c38d2ddfc5cbfa81c89 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 30 Mar 2025 09:45:27 -0500 Subject: [PATCH 072/124] record_type_definition tests pass. --- vsg/vhdlFile/classify/element_declaration.py | 12 +++++------- .../classify/element_subtype_definition.py | 4 ++-- .../classify/record_type_definition.py | 19 +++++++++---------- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/vsg/vhdlFile/classify/element_declaration.py b/vsg/vhdlFile/classify/element_declaration.py index f73715093..d38099238 100644 --- a/vsg/vhdlFile/classify/element_declaration.py +++ b/vsg/vhdlFile/classify/element_declaration.py @@ -7,18 +7,16 @@ @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ element_declaration ::= identifier_list : element_subtype_definition ; """ - iCurrent = identifier_list.classify_until([":"], iToken, lObjects) + identifier_list.classify_until([":"], oDataStructure) - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) + oDataStructure.replace_next_token_required(":", token.colon) - iCurrent = element_subtype_definition.classify(iCurrent, lObjects) + element_subtype_definition.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/element_subtype_definition.py b/vsg/vhdlFile/classify/element_subtype_definition.py index d4f480d0e..6ebd8e546 100644 --- a/vsg/vhdlFile/classify/element_subtype_definition.py +++ b/vsg/vhdlFile/classify/element_subtype_definition.py @@ -5,10 +5,10 @@ @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ element_subtype_definition ::= subtype_indication """ - return subtype_indication.classify(iToken, lObjects) + subtype_indication.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/record_type_definition.py b/vsg/vhdlFile/classify/record_type_definition.py index 8d5a4275a..1b6e8c833 100644 --- a/vsg/vhdlFile/classify/record_type_definition.py +++ b/vsg/vhdlFile/classify/record_type_definition.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import record_type_definition as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import element_declaration @@ -17,20 +16,20 @@ def detect(oDataStructure): """ if oDataStructure.is_next_token("record"): - classify(iToken, lObjects) + classify(oDataStructure) return True return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("record", token.record_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.record_keyword) - iCurrent = utils.classify_subelement_until("end", element_declaration, iCurrent, lObjects) + # TODO: This while loop could be an issue if end is never found. + while not oDataStructure.is_next_token("end"): + element_declaration.classify(oDataStructure) - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("record", token.end_record_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.record_type_simple_name, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_required("record", token.end_record_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.record_type_simple_name) From da060499e8bea2e455944aa71d7ef68566194d17 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 30 Mar 2025 09:49:24 -0500 Subject: [PATCH 073/124] report_statement tests pass. --- vsg/token/report_statement.py | 2 +- vsg/vhdlFile/classify/report_statement.py | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/vsg/token/report_statement.py b/vsg/token/report_statement.py index 0ae94ccc8..86084d349 100644 --- a/vsg/token/report_statement.py +++ b/vsg/token/report_statement.py @@ -17,7 +17,7 @@ class label_colon(parser.label_colon): unique_id = report_statement : label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() diff --git a/vsg/vhdlFile/classify/report_statement.py b/vsg/vhdlFile/classify/report_statement.py index 43ba5856f..03416c4f0 100644 --- a/vsg/vhdlFile/classify/report_statement.py +++ b/vsg/vhdlFile/classify/report_statement.py @@ -21,16 +21,14 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.tokenize_label(iToken, lObjects, token.label, token.label_colon) - iCurrent = utils.assign_next_token_required("report", token.report_keyword, iCurrent, lObjects) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.label, token.label_colon) + oDataStructure.replace_next_token_with(token.report_keyword) - iCurrent = expression.classify_until([";", "severity"], iCurrent, lObjects) + expression.classify_until([";", "severity"], oDataStructure) - if utils.is_next_token("severity", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("severity", token.severity_keyword, iCurrent, lObjects) - iCurrent = expression.classify_until([";"], iCurrent, lObjects) + if oDataStructure.is_next_token("severity"): + oDataStructure.replace_next_token_with(token.severity_keyword) + expression.classify_until([";"], oDataStructure) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) From 9a76340f91ee5ca0a53890002955990b5e0acf94 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 30 Mar 2025 09:55:44 -0500 Subject: [PATCH 074/124] return_statement tests pass. --- vsg/token/return_statement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsg/token/return_statement.py b/vsg/token/return_statement.py index 691f08a36..549c6266e 100644 --- a/vsg/token/return_statement.py +++ b/vsg/token/return_statement.py @@ -17,7 +17,7 @@ class label_colon(parser.label_colon): unique_id = return_statement : label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() From d7e27116399773cc770d10c15913ff27cedc0b68 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 30 Mar 2025 10:03:51 -0500 Subject: [PATCH 075/124] selected_assignment rules passing. --- .../classify/selected_force_assignment.py | 42 ++++++++++--------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/vsg/vhdlFile/classify/selected_force_assignment.py b/vsg/vhdlFile/classify/selected_force_assignment.py index 1c0bb5389..d86aab780 100644 --- a/vsg/vhdlFile/classify/selected_force_assignment.py +++ b/vsg/vhdlFile/classify/selected_force_assignment.py @@ -2,40 +2,42 @@ from vsg import decorators from vsg.token import selected_force_assignment as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import expression, force_mode, selected_expressions +from vsg.vhdlFile.classify import expression, force_mode, selected_expressions, utils @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ selected_force_assignment ::= [§ 10.5.4] with expression select [ ? ] target <= force [ force_mode ] selected_expressions ; """ - if utils.is_next_token_one_of(["when", "if", "elsif", "else"], iToken, lObjects): + if oDataStructure.is_next_token_one_of(["when", "if", "elsif", "else"]): return False - if utils.find_in_range("<=", iToken, ";", lObjects): - if utils.find_in_range("force", iToken, ";", lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.does_string_exist_before_string("<=", ";"): + if oDataStructure.does_string_exist_before_string("force", ";"): + classify(oDataStructure) + return True + return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("with", token.with_keyword, iToken, lObjects) - iCurrent = expression.classify_until(["select"], iToken, lObjects) - iCurrent = utils.assign_next_token_required("select", token.select_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("?", token.question_mark, iCurrent, lObjects) - iCurrent = utils.assign_tokens_until("<=", token.target, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("<=", token.assignment, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("force", token.force_keyword, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("with", token.with_keyword) - iCurrent = force_mode.detect(iCurrent, lObjects) + expression.classify_until(["select"], oDataStructure) - iCurrent = selected_expressions.classify_until([";"], iToken, lObjects) + oDataStructure.replace_next_token_required("select", token.select_keyword) + oDataStructure.replace_next_token_with_if("?", token.question_mark) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + utils.assign_tokens_until("<=", token.target, oDataStructure) - return iCurrent + oDataStructure.replace_next_token_required("<=", token.assignment) + oDataStructure.replace_next_token_required("force", token.force_keyword) + + force_mode.detect(oDataStructure) + + selected_expressions.classify_until([";"], oDataStructure) + + oDataStructure.replace_next_token_required(";", token.semicolon) From b922a013ce6ab285d89bb0677a6b189bac70906c Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 30 Mar 2025 10:33:38 -0500 Subject: [PATCH 076/124] type rules passing. --- vsg/vhdlFile/classify/access_type_definition.py | 8 +++----- vsg/vhdlFile/classify/incomplete_type_declaration.py | 11 ++++------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/vsg/vhdlFile/classify/access_type_definition.py b/vsg/vhdlFile/classify/access_type_definition.py index e7dd32d53..8bedc5d00 100644 --- a/vsg/vhdlFile/classify/access_type_definition.py +++ b/vsg/vhdlFile/classify/access_type_definition.py @@ -20,9 +20,7 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("access", token.access_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.access_keyword) - iCurrent = subtype_indication.classify(iCurrent, lObjects) - - return iCurrent + subtype_indication.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/incomplete_type_declaration.py b/vsg/vhdlFile/classify/incomplete_type_declaration.py index 9a9802466..86b227ef0 100644 --- a/vsg/vhdlFile/classify/incomplete_type_declaration.py +++ b/vsg/vhdlFile/classify/incomplete_type_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import incomplete_type_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier @@ -19,11 +18,9 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("type", token.type_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("type", token.type_keyword) - iCurrent = identifier.classify(iCurrent, lObjects, token.identifier) + identifier.classify(oDataStructure, token.identifier) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required(";", token.semicolon) From 731f1bae9e45b7412f53339be1ea45ca47f8d5c8 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 30 Mar 2025 13:36:38 -0500 Subject: [PATCH 077/124] alias_declaration classify passes. --- vsg/vhdlFile/classify/alias_declaration.py | 5 +-- vsg/vhdlFile/classify/signature.py | 37 +++++++++------------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/vsg/vhdlFile/classify/alias_declaration.py b/vsg/vhdlFile/classify/alias_declaration.py index d4bf970bb..6075d4bab 100644 --- a/vsg/vhdlFile/classify/alias_declaration.py +++ b/vsg/vhdlFile/classify/alias_declaration.py @@ -32,7 +32,8 @@ def classify(oDataStructure): oDataStructure.replace_next_token_required("is", token.is_keyword) name.classify_until([";", "["], oDataStructure) - - signature.detect(oDataStructure) + oDataStructure.debug_print(10) + if signature.detect(oDataStructure): + signature.classify(oDataStructure) oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/signature.py b/vsg/vhdlFile/classify/signature.py index 97c2ff912..32e21d04c 100644 --- a/vsg/vhdlFile/classify/signature.py +++ b/vsg/vhdlFile/classify/signature.py @@ -18,34 +18,27 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("[", token.open_bracket, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("[", token.open_bracket) - detect_type_mark(iCurrent, lObjects) + detect_type_mark(oDataStructure) - detect_return(iCurrent, lObjects) + detect_return(oDataStructure) - iCurrent = utils.assign_next_token_required("]", token.close_bracket, iCurrent, lObjects) - - return iCurrent + oDataStructure.replace_next_token_required("]", token.close_bracket) @decorators.print_classifier_debug_info(__name__) -def detect_return(iToken, lObjects): - iCurrent = iToken - if utils.is_next_token("return", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("return", token.return_keyword, iCurrent, lObjects) - iCurrent = type_mark.classify(iCurrent, lObjects) - return iCurrent +def detect_return(oDataStructure): + if oDataStructure.is_next_token("return"): + oDataStructure.replace_next_token_with(token.return_keyword) + type_mark.classify(oDataStructure) @decorators.print_classifier_debug_info(__name__) -def detect_type_mark(iToken, lObjects): - iCurrent = iToken - if not utils.is_next_token("return", iCurrent, lObjects): - iCurrent = type_mark.classify(iCurrent, lObjects) - while utils.is_next_token(",", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(",", token.comma, iCurrent, lObjects) - iCurrent = type_mark.classify(iCurrent, lObjects) - - return iCurrent +def detect_type_mark(oDataStructure): + if not oDataStructure.is_next_token("return"): + type_mark.classify(oDataStructure) + while oDataStructure.is_next_token(","): + oDataStructure.replace_next_token_required(",", token.comma) + type_mark.classify(oDataStructure) From 4e91274ff4e5ab9823aaadf684755fa761b842b0 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 30 Mar 2025 13:38:00 -0500 Subject: [PATCH 078/124] Removing debug_print --- vsg/vhdlFile/classify/alias_declaration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsg/vhdlFile/classify/alias_declaration.py b/vsg/vhdlFile/classify/alias_declaration.py index 6075d4bab..646158494 100644 --- a/vsg/vhdlFile/classify/alias_declaration.py +++ b/vsg/vhdlFile/classify/alias_declaration.py @@ -32,7 +32,7 @@ def classify(oDataStructure): oDataStructure.replace_next_token_required("is", token.is_keyword) name.classify_until([";", "["], oDataStructure) - oDataStructure.debug_print(10) + if signature.detect(oDataStructure): signature.classify(oDataStructure) From d895d6ce9b9a5be5cc3387f63a47bf535f55c439 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 30 Mar 2025 13:48:25 -0500 Subject: [PATCH 079/124] attribute_specification classify test passes --- vsg/vhdlFile/classify/entity_designator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vsg/vhdlFile/classify/entity_designator.py b/vsg/vhdlFile/classify/entity_designator.py index 2f514c1b1..68f50926a 100644 --- a/vsg/vhdlFile/classify/entity_designator.py +++ b/vsg/vhdlFile/classify/entity_designator.py @@ -14,4 +14,5 @@ def classify(oDataStructure): oDataStructure.replace_next_token_with(token.entity_tag) - signature.detect(oDataStructure) + if signature.detect(oDataStructure): + signature.classify(oDataStructure) From 60e6c31aba0f863dfe729c80c89044c8c1567d1e Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 30 Mar 2025 14:07:37 -0500 Subject: [PATCH 080/124] block_statement classify test pass --- vsg/vhdlFile/classify/concurrent_assertion_statement.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vsg/vhdlFile/classify/concurrent_assertion_statement.py b/vsg/vhdlFile/classify/concurrent_assertion_statement.py index 1ce222e45..560f2e49a 100644 --- a/vsg/vhdlFile/classify/concurrent_assertion_statement.py +++ b/vsg/vhdlFile/classify/concurrent_assertion_statement.py @@ -18,7 +18,12 @@ def detect(oDataStructure): """ - if oDataStructure.does_string_exist_in_next_n_tokens("assert", 4): + if ( + oDataStructure.are_next_consecutive_tokens([None, ":", "postponed", "assert"]) + or oDataStructure.are_next_consecutive_tokens([None, ":", "assert"]) + or oDataStructure.are_next_consecutive_tokens(["postponed", "assert"]) + or oDataStructure.is_next_token("assert") + ): classify(oDataStructure) return True return False From f0c65e28ce8113345b4899701d86b659460ca69f Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 30 Mar 2025 14:28:23 -0500 Subject: [PATCH 081/124] concurrent_simple_signal_assignment test pass. --- vsg/vhdlFile/classify/component_instantiation_statement.py | 6 ++++++ vsg/vhdlFile/classify/instantiated_unit.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/vsg/vhdlFile/classify/component_instantiation_statement.py b/vsg/vhdlFile/classify/component_instantiation_statement.py index 63075950e..bb6680f84 100644 --- a/vsg/vhdlFile/classify/component_instantiation_statement.py +++ b/vsg/vhdlFile/classify/component_instantiation_statement.py @@ -20,6 +20,12 @@ def detect(oDataStructure): [ port_map_aspect ] ; """ if oDataStructure.are_next_consecutive_tokens([None, ":"]): + oDataStructure.align_seek_index() + oDataStructure.advance_to_next_seek_token() + oDataStructure.increment_seek_index() + oDataStructure.advance_to_next_seek_token() + oDataStructure.increment_seek_index() + oDataStructure.advance_to_next_seek_token() if instantiated_unit.detect(oDataStructure): classify(oDataStructure) return True diff --git a/vsg/vhdlFile/classify/instantiated_unit.py b/vsg/vhdlFile/classify/instantiated_unit.py index 0c6d8a535..ad04e1c46 100644 --- a/vsg/vhdlFile/classify/instantiated_unit.py +++ b/vsg/vhdlFile/classify/instantiated_unit.py @@ -12,7 +12,8 @@ def detect(oDataStructure): | entity entity_name [ ( *architecture*_identifier ) ] | configuration configuration_name """ - if oDataStructure.is_next_token_one_of(["component", "entity", "configuration"]): + + if oDataStructure.is_next_seek_token_one_of(["component", "entity", "configuration"]): return True if oDataStructure.does_string_exist_in_next_n_tokens(";", 2): return True From 499823a03c44190d95f7a0a794b53f4cfeeeb74a Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 6 Apr 2025 19:07:08 -0500 Subject: [PATCH 082/124] configuration_declaration classify test passes. --- vsg/data_structure.py | 8 +++- vsg/decorators.py | 1 + vsg/vhdlFile/classify/binding_indication.py | 32 ++++++--------- vsg/vhdlFile/classify/block_configuration.py | 15 ++++--- vsg/vhdlFile/classify/block_specification.py | 16 ++++---- .../classify/component_configuration.py | 40 +++++++++---------- .../classify/component_specification.py | 32 ++++++--------- vsg/vhdlFile/classify/configuration_item.py | 18 ++------- vsg/vhdlFile/classify/entity_aspect.py | 30 ++++++-------- .../classify/generate_specification.py | 4 +- .../classify/group_constituent_list.py | 17 ++++---- vsg/vhdlFile/classify/group_declaration.py | 16 ++++---- vsg/vhdlFile/classify/instantiation_list.py | 23 +++++------ vsg/vhdlFile/classify/utils.py | 4 +- vsg/vhdlFile/vhdlFile.py | 3 ++ 15 files changed, 115 insertions(+), 144 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 63a626fd2..3d9857d6b 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -106,6 +106,9 @@ def does_string_exist_before_seek_index_honoring_parenthesis_hierarchy(self, sSt def does_string_exist_in_next_n_tokens(self, sString, iNumTokens): self.iSeek = self.iCurrent + return self.does_string_exist_in_next_n_tokens_from_seek_index(sString, iNumTokens) + + def does_string_exist_in_next_n_tokens_from_seek_index(self, sString, iNumTokens): for x in range(0, iNumTokens): self.seek_to_next_token() if self.seek_token_lower_value_is(sString): @@ -116,6 +119,9 @@ def does_string_exist_in_next_n_tokens(self, sString, iNumTokens): def get_current_index(self): return self.iCurrent + def get_current_token(self): + return self.lAllObjects[self.iCurrent] + def get_current_token_lower_value(self): return self.lAllObjects[self.iCurrent].lower_value @@ -174,7 +180,7 @@ def replace_next_token_required(self, sToken, token): if self.is_next_token(sToken): self.replace_current_token_with(token) else: - utils.print_error_message(sToken, token, self) + utils.print_error_message(sToken, token, self.get_current_token(), self) def replace_next_token_with(self, token): self.advance_to_next_token() diff --git a/vsg/decorators.py b/vsg/decorators.py index 77f39cabe..3aa1fea00 100644 --- a/vsg/decorators.py +++ b/vsg/decorators.py @@ -14,6 +14,7 @@ def wrapper(*args, **kwargs): level = 0 +display = True display = False diff --git a/vsg/vhdlFile/classify/binding_indication.py b/vsg/vhdlFile/classify/binding_indication.py index 930b85d3a..8ee4bc455 100644 --- a/vsg/vhdlFile/classify/binding_indication.py +++ b/vsg/vhdlFile/classify/binding_indication.py @@ -2,37 +2,29 @@ from vsg import decorators from vsg.token import binding_indication as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_aspect, generic_map_aspect, port_map_aspect @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): - if utils.is_next_token("use", iToken, lObjects): - return classify(iToken, lObjects) - if utils.is_next_token("generic", iToken, lObjects): - return classify(iToken, lObjects) - if utils.is_next_token("port", iToken, lObjects): - return classify(iToken, lObjects) - return iToken - - -@decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def detect(oDataStructure): """ binding_indication ::= [ **use** entity_aspect ] [ generic_map_aspect ] [ port_map_aspect ] """ - iCurrent = iToken + if oDataStructure.is_next_token_one_of(["use", "generic", "port"]): + classify(oDataStructure) + return True + return False - if utils.is_next_token("use", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("use", token.use_keyword, iCurrent, lObjects) - iCurrent = entity_aspect.classify(iCurrent, lObjects) - iCurrent = generic_map_aspect.detect(iCurrent, lObjects) +@decorators.print_classifier_debug_info(__name__) +def classify(oDataStructure): + if oDataStructure.is_next_token("use"): + oDataStructure.replace_next_token_with(token.use_keyword) + entity_aspect.classify(oDataStructure) - iCurrent = port_map_aspect.detect(iCurrent, lObjects) + generic_map_aspect.detect(oDataStructure) - return iCurrent + port_map_aspect.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/block_configuration.py b/vsg/vhdlFile/classify/block_configuration.py index a85912f86..8bd6dbae3 100644 --- a/vsg/vhdlFile/classify/block_configuration.py +++ b/vsg/vhdlFile/classify/block_configuration.py @@ -27,10 +27,13 @@ def classify(oDataStructure): block_specification.classify(oDataStructure) - use_clause.detect(oDataStructure) - configuration_item.detect(oDataStructure) + while use_clause.detect(oDataStructure): + pass - oDataStructure.replace_next_token_required("end", token.end_keyword, iCurrent, lObjects) - oDataStructure.replace_next_token_required("for", token.end_for_keyword, iCurrent, lObjects) - oDataStructure.replace_next_token_with_if_not(";", token.unspecified, iCurrent, lObjects) - oDataStructure.replace_next_token_required(";", token.semicolon, iCurrent, lObjects) + while configuration_item.detect(oDataStructure): + pass + + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_required("for", token.end_for_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.unspecified) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/block_specification.py b/vsg/vhdlFile/classify/block_specification.py index 61b143bb5..e5e1b2380 100644 --- a/vsg/vhdlFile/classify/block_specification.py +++ b/vsg/vhdlFile/classify/block_specification.py @@ -7,7 +7,7 @@ @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ block_specification ::= architecture_name @@ -15,12 +15,10 @@ def classify(iToken, lObjects): | generate_statement_label [ ( generate_specification ) ] """ - if utils.find_in_next_n_tokens("(", 2, iToken, lObjects): - iCurrent = utils.assign_next_token(token.generate_statement_label, iToken, lObjects) - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) - iCurrent = generate_specification.classify(iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) + if oDataStructure.does_string_exist_in_next_n_tokens("(", 2): + oDataStructure.replace_next_token_with(token.generate_statement_label) + oDataStructure.replace_next_token_required("(", token.open_parenthesis) + generate_specification.classify(oDataStructure) + oDataStructure.replace_next_token_required(")", token.close_parenthesis) else: - iCurrent = utils.assign_next_token(token.architecture_name, iToken, lObjects) - - return iCurrent + oDataStructure.replace_next_token_with(token.architecture_name) diff --git a/vsg/vhdlFile/classify/component_configuration.py b/vsg/vhdlFile/classify/component_configuration.py index a0baf8182..424aa2ec3 100644 --- a/vsg/vhdlFile/classify/component_configuration.py +++ b/vsg/vhdlFile/classify/component_configuration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import component_configuration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( binding_indication, block_configuration, @@ -11,16 +10,7 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): - if utils.is_next_token("for", iToken, lObjects): - iCurrent = utils.find_next_token(iToken, lObjects) + 1 - if component_specification.detect(iCurrent, lObjects): - return classify(iToken, lObjects) - return iToken - - -@decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def detect(oDataStructure): """ component_configuration ::= for component_specification @@ -30,19 +20,25 @@ def classify(iToken, lObjects): end for ; """ - iCurrent = utils.assign_next_token_required("for", token.for_keyword, iToken, lObjects) + if oDataStructure.is_next_token("for"): + oDataStructure.increment_seek_index() + if component_specification.detect(oDataStructure): + classify(oDataStructure) + return True + return False - iCurrent = component_specification.classify(iCurrent, lObjects) - iPrevious = iCurrent - iCurrent = binding_indication.detect(iCurrent, lObjects) - if not iPrevious == iCurrent: - iCurrent = utils.assign_next_token_required(";", token.binding_indication_semicolon, iCurrent, lObjects) +@decorators.print_classifier_debug_info(__name__) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("for", token.for_keyword) + + component_specification.classify(oDataStructure) - iCurrent = block_configuration.detect(iCurrent, lObjects) + if binding_indication.detect(oDataStructure): + oDataStructure.replace_next_token_required(";", token.binding_indication_semicolon) - iCurrent = utils.assign_next_token_required("end", token.end_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("for", token.end_for_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(";", token.semicolon, iCurrent, lObjects) + block_configuration.detect(oDataStructure) - return iCurrent + oDataStructure.replace_next_token_required("end", token.end_keyword) + oDataStructure.replace_next_token_required("for", token.end_for_keyword) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/component_specification.py b/vsg/vhdlFile/classify/component_specification.py index d5d652338..b5ab4ea87 100644 --- a/vsg/vhdlFile/classify/component_specification.py +++ b/vsg/vhdlFile/classify/component_specification.py @@ -2,35 +2,27 @@ from vsg import decorators from vsg.token import component_specification as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import instantiation_list @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): - iCurrent = iToken - - while utils.find_in_next_n_tokens(",", 2, iCurrent, lObjects): - iCurrent = utils.find_next_token(iCurrent, lObjects) - iCurrent = utils.find_next_token(iCurrent + 1, lObjects) - - if utils.find_in_next_n_tokens(":", 2, iCurrent, lObjects): - return True - return False - - -@decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def detect(oDataStructure): """ component_specification ::= instantiation_list : component_name """ - iCurrent = iToken + while oDataStructure.does_string_exist_in_next_n_tokens_from_seek_index(",", 2): + oDataStructure.increment_seek_index() - iCurrent = instantiation_list.classify(iToken, lObjects) + if oDataStructure.does_string_exist_in_next_n_tokens_from_seek_index(":", 2): + return True + return False - iCurrent = utils.assign_next_token_required(":", token.colon, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.component_name, iCurrent, lObjects) - return iCurrent +@decorators.print_classifier_debug_info(__name__) +def classify(oDataStructure): + instantiation_list.classify(oDataStructure) + + oDataStructure.replace_next_token_required(":", token.colon) + oDataStructure.replace_next_token_with(token.component_name) diff --git a/vsg/vhdlFile/classify/configuration_item.py b/vsg/vhdlFile/classify/configuration_item.py index f49385b7c..21cf263c4 100644 --- a/vsg/vhdlFile/classify/configuration_item.py +++ b/vsg/vhdlFile/classify/configuration_item.py @@ -5,24 +5,14 @@ @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): - return classify(iToken, lObjects) - - -@decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def detect(oDataStructure): """ configuration_item ::= block_configuration | component_configuration """ - iCurrent = component_configuration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent - - iCurrent = block_configuration.detect(iToken, lObjects) - if iCurrent != iToken: - return iCurrent + if component_configuration.detect(oDataStructure): + return True - return iToken + return block_configuration.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/entity_aspect.py b/vsg/vhdlFile/classify/entity_aspect.py index 522a4ddb2..946ecb34b 100644 --- a/vsg/vhdlFile/classify/entity_aspect.py +++ b/vsg/vhdlFile/classify/entity_aspect.py @@ -2,33 +2,29 @@ from vsg import decorators from vsg.token import entity_aspect as token -from vsg.vhdlFile import utils @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ entity_aspect ::= **entity** entity_name [ ( architecture_identifier ) ] | **configuration** configuration_name | **open** """ - iCurrent = iToken - if utils.is_next_token("open", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("open", token.open_keyword, iCurrent, lObjects) + if oDataStructure.is_next_token("open"): + oDataStructure.replace_next_token_with(token.open_keyword) - elif utils.is_next_token("configuration", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("configuration", token.configuration_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.configuration_name, iCurrent, lObjects) + elif oDataStructure.is_next_token("configuration"): + oDataStructure.replace_next_token_with(token.configuration_keyword) + oDataStructure.replace_next_token_with(token.configuration_name) - elif utils.is_next_token("entity", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("entity", token.entity_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.entity_name, iCurrent, lObjects) + elif oDataStructure.is_next_token("entity"): + oDataStructure.replace_next_token_with(token.entity_keyword) + oDataStructure.replace_next_token_with(token.entity_name) - if utils.is_next_token("(", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.architecture_identifier, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) - - return iCurrent + if oDataStructure.is_next_token("("): + oDataStructure.replace_next_token_with(token.open_parenthesis) + oDataStructure.replace_next_token_with(token.architecture_identifier) + oDataStructure.replace_next_token_required(")", token.close_parenthesis) diff --git a/vsg/vhdlFile/classify/generate_specification.py b/vsg/vhdlFile/classify/generate_specification.py index 39715a99c..d80b56986 100644 --- a/vsg/vhdlFile/classify/generate_specification.py +++ b/vsg/vhdlFile/classify/generate_specification.py @@ -5,7 +5,7 @@ @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ generate_specification ::= static_discrete_range @@ -13,4 +13,4 @@ def classify(iToken, lObjects): | alternative_label """ - return expression.classify_until([")"], iToken, lObjects) + expression.classify_until([")"], oDataStructure) diff --git a/vsg/vhdlFile/classify/group_constituent_list.py b/vsg/vhdlFile/classify/group_constituent_list.py index d197c8a2f..c05e7fb56 100644 --- a/vsg/vhdlFile/classify/group_constituent_list.py +++ b/vsg/vhdlFile/classify/group_constituent_list.py @@ -2,19 +2,16 @@ from vsg import decorators from vsg.token import group_constituent_list as token -from vsg.vhdlFile import utils @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ - association_list ::= - association_element { , association_element } + group_constituent_list ::= + group_constituent { , group_constituent } """ - iCurrent = utils.assign_next_token(token.group_constituent, iToken, lObjects) + oDataStructure.replace_next_token_with(token.group_constituent) - while utils.is_next_token(",", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(",", token.comma, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.group_constituent, iToken, lObjects) - - return iCurrent + while oDataStructure.is_next_token(","): + oDataStructure.replace_next_token_with(token.comma) + oDataStructure.replace_next_token_with(token.group_constituent) diff --git a/vsg/vhdlFile/classify/group_declaration.py b/vsg/vhdlFile/classify/group_declaration.py index a266eb468..4727d1f74 100644 --- a/vsg/vhdlFile/classify/group_declaration.py +++ b/vsg/vhdlFile/classify/group_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import group_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import group_constituent_list @@ -21,13 +20,14 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): - oDataStructure.replace_next_token_with("group", token.group_keyword, iToken, lObjects) - oDataStructure.replace_next_token_with(token.identifier, iCurrent, lObjects) - oDataStructure.replace_next_token_required(":", token.colon, iCurrent, lObjects) - oDataStructure.replace_next_token_with(token.group_template_name, iCurrent, lObjects) - oDataStructure.replace_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) + oDataStructure.replace_next_token_with(token.group_keyword) + oDataStructure.replace_next_token_with(token.identifier) + oDataStructure.replace_next_token_required(":", token.colon) + oDataStructure.replace_next_token_with(token.group_template_name) + + oDataStructure.replace_next_token_required("(", token.open_parenthesis) group_constituent_list.classify(oDataStructure) - oDataStructure.replace_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) - oDataStructure.replace_next_token_required(";", token.semicolon, iCurrent, lObjects) + oDataStructure.replace_next_token_required(")", token.close_parenthesis) + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/instantiation_list.py b/vsg/vhdlFile/classify/instantiation_list.py index 57df6aea7..fe0c6b6d7 100644 --- a/vsg/vhdlFile/classify/instantiation_list.py +++ b/vsg/vhdlFile/classify/instantiation_list.py @@ -2,28 +2,25 @@ from vsg import decorators from vsg.token import instantiation_list as token -from vsg.vhdlFile import utils @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ instantiation_list ::= instantiation_label { , instantiation_label } | **others** | **all** """ + if oDataStructure.is_next_token("others"): + oDataStructure.replace_next_token_required("others", token.others_keyword) - if utils.is_next_token("others", iToken, lObjects): - return utils.assign_next_token_required("others", token.others_keyword, iToken, lObjects) + elif oDataStructure.is_next_token("all"): + oDataStructure.replace_next_token_required("all", token.all_keyword) - if utils.is_next_token("all", iToken, lObjects): - return utils.assign_next_token_required("all", token.all_keyword, iToken, lObjects) + else: + oDataStructure.replace_next_token_with(token.instantiation_label) - iCurrent = utils.assign_next_token(token.instantiation_label, iToken, lObjects) - - while utils.is_next_token(",", iCurrent, lObjects): - iCurrent = utils.assign_next_token_required(",", token.comma, iToken, lObjects) - iCurrent = utils.assign_next_token(token.instantiation_label, iToken, lObjects) - - return iCurrent + while oDataStructure.is_next_token(","): + oDataStructure.replace_next_token_required(",", token.comma) + oDataStructure.replace_next_token_with(token.instantiation_label) diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index e2c21d95e..245064d63 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -221,11 +221,11 @@ def tokenize_postponed(oDataStructure, token): oDataStructure.replace_next_token_with_if("postponed", token) -def print_error_message(sToken, token, oDataStructure): +def print_error_message(sToken, token, currentToken, oDataStructure): sFoundToken = oDataStructure.get_current_token_value() iLine = 0 iColumn = 0 - # iLine = calculate_line_number(iToken, lObjects) + iLine = currentToken.iLineNumber # iColumn = calculate_column(iToken, lObjects) sModuleName = extract_module_name(token) sFileName = oDataStructure.sFilename diff --git a/vsg/vhdlFile/vhdlFile.py b/vsg/vhdlFile/vhdlFile.py index 83fa977ef..047a8302f 100644 --- a/vsg/vhdlFile/vhdlFile.py +++ b/vsg/vhdlFile/vhdlFile.py @@ -128,12 +128,14 @@ def _processFile(self): oOptions = options() self.lAllObjects = [] + iLineNumber = 1 for sLine in self.filecontent: self.dVars["line"] = sLine lTokens = tokens.create(sLine.rstrip("\n").rstrip("\r")) lObjects = [] for sToken in lTokens: lObjects.append(parser.item(sToken)) + lObjects[-1].iLineNumber = iLineNumber blank.classify(lObjects, oOptions) whitespace.classify(lTokens, lObjects) @@ -143,6 +145,7 @@ def _processFile(self): self.lAllObjects.extend(lObjects) self.lAllObjects.append(parser.carriage_return()) + iLineNumber += 1 try: self.lAllObjects[0].set_filename(self.filename) From 06664f9bff825097a5ad81b973455b24212b8ef5 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 6 Apr 2025 19:10:03 -0500 Subject: [PATCH 083/124] configuration_specification classify test passes. --- .../classify/simple_configuration_specification.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/vsg/vhdlFile/classify/simple_configuration_specification.py b/vsg/vhdlFile/classify/simple_configuration_specification.py index 3aa458eb5..280b854fa 100644 --- a/vsg/vhdlFile/classify/simple_configuration_specification.py +++ b/vsg/vhdlFile/classify/simple_configuration_specification.py @@ -21,13 +21,15 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): - oDataStructure.assign_next_token_with(token.for_keyword) + oDataStructure.replace_next_token_with(token.for_keyword) component_specification.classify(oDataStructure) + binding_indication.classify(oDataStructure) - oDataStructure.assign_next_token_required(";", token.semicolon) - if utils.is_next_token("end"): - oDataStructure.assign_next_token_required("end", token.end_keyword) - oDataStructure.assign_next_token_required("for", token.end_for_keyword) - oDataStructure.assign_next_token_required(";", token.semicolon) + oDataStructure.replace_next_token_required(";", token.semicolon) + + if oDataStructure.is_next_token("end"): + oDataStructure.replace_next_token_with(token.end_keyword) + oDataStructure.replace_next_token_required("for", token.end_for_keyword) + oDataStructure.replace_next_token_required(";", token.semicolon) From abf87ea416b38701c8b0382de626a7d2800811ae Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 6 Apr 2025 19:57:12 -0500 Subject: [PATCH 084/124] simple_waveform_assignment classify test passing. --- vsg/vhdlFile/classify/procedure_call.py | 5 ++++- vsg/vhdlFile/classify/simple_signal_assignment.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/vsg/vhdlFile/classify/procedure_call.py b/vsg/vhdlFile/classify/procedure_call.py index 8993a5b76..1d1c4b381 100644 --- a/vsg/vhdlFile/classify/procedure_call.py +++ b/vsg/vhdlFile/classify/procedure_call.py @@ -5,7 +5,7 @@ from vsg.vhdlFile import utils from vsg.vhdlFile.classify import actual_parameter_part -lExceptions = ["<=", "end", "map", "component", "entity", "configuration", "if"] +lExceptions = ["end", "map", "component", "entity", "configuration", "if"] @decorators.print_classifier_debug_info(__name__) @@ -27,6 +27,9 @@ def detect(oDataStructure): Differentiating a procedure call from anything else is essentially the absence of keywords. """ + oDataStructure.align_seek_index() + if oDataStructure.does_string_exist_before_string_honoring_parenthesis_hierarchy("<=", ";"): + return False oDataStructure.align_seek_index() while not oDataStructure.seek_token_lower_value_is(";"): if oDataStructure.get_seek_token_lower_value() in lExceptions: diff --git a/vsg/vhdlFile/classify/simple_signal_assignment.py b/vsg/vhdlFile/classify/simple_signal_assignment.py index c09d23a79..c5ae1cdb8 100644 --- a/vsg/vhdlFile/classify/simple_signal_assignment.py +++ b/vsg/vhdlFile/classify/simple_signal_assignment.py @@ -20,7 +20,8 @@ def detect(oDataStructure): if oDataStructure.is_next_token_one_of(["if", "elsif", "else"]): return False - if oDataStructure.does_string_exist_before_string("<=", ";"): + oDataStructure.align_seek_index() + if oDataStructure.does_string_exist_before_string_honoring_parenthesis_hierarchy("<=", ";"): if oDataStructure.does_string_exist_before_string("with", ";"): return False if oDataStructure.does_string_exist_before_string("when", ";"): From 2e4a03599655a0b54eba2641f76191aa3673fbbe Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 7 Apr 2025 06:58:06 -0500 Subject: [PATCH 085/124] entity_statement_part classify test pass --- vsg/vhdlFile/classify/entity_statement.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/vsg/vhdlFile/classify/entity_statement.py b/vsg/vhdlFile/classify/entity_statement.py index 8c49c9b09..e26bb9b84 100644 --- a/vsg/vhdlFile/classify/entity_statement.py +++ b/vsg/vhdlFile/classify/entity_statement.py @@ -19,15 +19,12 @@ def detect(oDataStructure): """ if process_statement.detect(oDataStructure): - process_statement.classify(oDataStructure) return True if concurrent_assertion_statement.detect(oDataStructure): - concurrent_assertion_statement.classify(oDataStructure) return True if concurrent_procedure_call_statement.detect(oDataStructure): - concurrent_procedure_call_statement.classify(oDataStructure) return True return False From 9f8a9705c8ad5a8a7650ed3ed9470dafddb82eea Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 7 Apr 2025 07:22:28 -0500 Subject: [PATCH 086/124] external_name classify test pass --- .../classify/external_constant_name.py | 3 +-- vsg/vhdlFile/classify/external_signal_name.py | 5 ++--- .../classify/external_variable_name.py | 5 ++--- vsg/vhdlFile/classify/utils.py | 18 ++++++++++++++++++ 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/vsg/vhdlFile/classify/external_constant_name.py b/vsg/vhdlFile/classify/external_constant_name.py index 0129128ce..7f02750f8 100644 --- a/vsg/vhdlFile/classify/external_constant_name.py +++ b/vsg/vhdlFile/classify/external_constant_name.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import external_constant_name as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import subtype_indication +from vsg.vhdlFile.classify import subtype_indication, utils @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/external_signal_name.py b/vsg/vhdlFile/classify/external_signal_name.py index 1df778f7e..ebb01aa83 100644 --- a/vsg/vhdlFile/classify/external_signal_name.py +++ b/vsg/vhdlFile/classify/external_signal_name.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import external_signal_name as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import subtype_indication +from vsg.vhdlFile.classify import subtype_indication, utils @decorators.print_classifier_debug_info(__name__) @@ -26,7 +25,7 @@ def classify(oDataStructure): oDataStructure.replace_next_token_with(token.external_pathname) while oDataStructure.is_next_token("("): - iCurrent = utils.assign_parenthesis_as_todo(iCurrent, lObjects) + utils.assign_parenthesis_as_todo(oDataStructure) oDataStructure.replace_next_token_with_if_not(":", token.external_pathname) oDataStructure.replace_next_token_required(":", token.colon) diff --git a/vsg/vhdlFile/classify/external_variable_name.py b/vsg/vhdlFile/classify/external_variable_name.py index 5b426d6e8..193d5dacd 100644 --- a/vsg/vhdlFile/classify/external_variable_name.py +++ b/vsg/vhdlFile/classify/external_variable_name.py @@ -2,8 +2,7 @@ from vsg import decorators from vsg.token import external_variable_name as token -from vsg.vhdlFile import utils -from vsg.vhdlFile.classify import subtype_indication +from vsg.vhdlFile.classify import subtype_indication, utils @decorators.print_classifier_debug_info(__name__) @@ -26,7 +25,7 @@ def classify(oDataStructure): oDataStructure.replace_next_token_with(token.external_pathname) while oDataStructure.is_next_token("("): - iCurrent = utils.assign_parenthesis_as_todo(iCurrent, lObjects) + utils.assign_parenthesis_as_todo(oDataStructure) oDataStructure.replace_next_token_with_if_not(":", token.external_pathname) oDataStructure.replace_next_token_required(":", token.colon) diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 245064d63..82cc0cba2 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -247,3 +247,21 @@ def extract_module_name(token): def assignment_operator_found(oDataStructure): return oDataStructure.does_string_exist_before_string_honoring_parenthesis_hierarchy("<=", ";") + + +def assign_parenthesis_as_todo(oDataStructure): + if oDataStructure.is_next_token("("): + oDataStructure.replace_next_token_with(parser.open_parenthesis) + + assign_tokens_until_matching_closing_paren(parser.todo, oDataStructure) + + oDataStructure.replace_next_token_with(parser.close_parenthesis) + + +def assign_tokens_until_matching_closing_paren(token, oDataStructure): + iCounter = 1 + while oDataStructure.advance_to_next_token(): + iCounter = update_paren_counter(iCounter, oDataStructure) + if is_current_token_close_paren(oDataStructure) and iCounter == 0: + break + oDataStructure.replace_current_token_with(token) From 7558b043f334762c996c54188ef426865b6b8db2 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 7 Apr 2025 21:44:12 -0500 Subject: [PATCH 087/124] full_type_declaration classify test pass --- vsg/data_structure.py | 2 +- vsg/token/primary_unit_declaration.py | 2 +- vsg/token/secondary_unit_declaration.py | 4 +-- .../classify/physical_type_definition.py | 30 +++++++------------ vsg/vhdlFile/classify/prefix.py | 10 ++++--- .../classify/primary_unit_declaration.py | 17 ++++------- .../classify/secondary_unit_declaration.py | 25 +++++++--------- 7 files changed, 37 insertions(+), 53 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 3d9857d6b..186445b8f 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -225,7 +225,7 @@ def advance_seek_over_parenthesis(self): elif oToken.lower_value == ")": iParen -= 1 if iParen == 0: - self.iSeek += iToken + self.iSeek += iToken + 1 return True return False diff --git a/vsg/token/primary_unit_declaration.py b/vsg/token/primary_unit_declaration.py index 8faf8c108..0867f1764 100644 --- a/vsg/token/primary_unit_declaration.py +++ b/vsg/token/primary_unit_declaration.py @@ -17,5 +17,5 @@ class semicolon(parser.semicolon): unique_id = primary_unit_declaration : semicolon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() diff --git a/vsg/token/secondary_unit_declaration.py b/vsg/token/secondary_unit_declaration.py index 85b583e20..42e6dcc0e 100644 --- a/vsg/token/secondary_unit_declaration.py +++ b/vsg/token/secondary_unit_declaration.py @@ -17,7 +17,7 @@ class equal_sign(parser.item): unique_id = secondary_unit_declaration : equal_sign """ - def __init__(self): + def __init__(self, sString=None): super().__init__("=") @@ -35,5 +35,5 @@ class semicolon(parser.semicolon): unique_id = secondary_unit_declaration : semicolon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() diff --git a/vsg/vhdlFile/classify/physical_type_definition.py b/vsg/vhdlFile/classify/physical_type_definition.py index 9ddf5de01..add13a621 100644 --- a/vsg/vhdlFile/classify/physical_type_definition.py +++ b/vsg/vhdlFile/classify/physical_type_definition.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import physical_type_definition as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( primary_unit_declaration, range_constraint, @@ -20,32 +19,23 @@ def detect(oDataStructure): { secondary_unit_declaration } **end** **units** [ physical_type_simple_name ] """ - if units_keyword_found_before_semicolon(oDataStructure): + if oDataStructure.does_string_exist_before_string("units", ";"): classify(oDataStructure) return True return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = range_constraint.detect(iToken, lObjects) - - iCurrent = utils.assign_next_token_required("units", token.units_keyword, iToken, lObjects) - - iCurrent = primary_unit_declaration.detect(iCurrent, lObjects) - - while not utils.is_next_token("end", iCurrent, lObjects): - iCurrent = secondary_unit_declaration.detect(iCurrent, lObjects) +def classify(oDataStructure): + range_constraint.detect(oDataStructure) - iCurrent = utils.assign_next_token(token.end_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("units", token.end_units_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_if_not(";", token.simple_name, iCurrent, lObjects) + oDataStructure.replace_next_token_required("units", token.units_keyword) - return iCurrent + primary_unit_declaration.detect(oDataStructure) + while not oDataStructure.is_next_token("end"): + secondary_unit_declaration.detect(oDataStructure) -@decorators.print_classifier_debug_info(__name__) -def units_keyword_found_before_semicolon(oDataStructure): - if oDataStructure.does_string_exist_before_string("units", ";"): - return True - return False + oDataStructure.replace_next_token_with(token.end_keyword) + oDataStructure.replace_next_token_required("units", token.end_units_keyword) + oDataStructure.replace_next_token_with_if_not(";", token.simple_name) diff --git a/vsg/vhdlFile/classify/prefix.py b/vsg/vhdlFile/classify/prefix.py index 5b56c29e3..bdee16770 100644 --- a/vsg/vhdlFile/classify/prefix.py +++ b/vsg/vhdlFile/classify/prefix.py @@ -8,7 +8,9 @@ def classify(oDataStructure, oToken): oDataStructure.replace_next_token_with(oToken.name) - if oDataStructure.is_next_seek_token("("): - oDataStructure.replace_next_token_with(open_parenthesis) - utils.replace_tokens_until_matching_closing_paren(parser.todo, oDataStructure) - oDataStructure.replace_next_token_with(lObjects, iCurrent, parser.close_parenthesis) + if oDataStructure.is_next_token("("): + oDataStructure.replace_next_token_with(parser.open_parenthesis) + + utils.assign_tokens_until_matching_closing_paren(parser.todo, oDataStructure) + + oDataStructure.replace_next_token_with(parser.close_parenthesis) diff --git a/vsg/vhdlFile/classify/primary_unit_declaration.py b/vsg/vhdlFile/classify/primary_unit_declaration.py index 31fd23787..f51646d75 100644 --- a/vsg/vhdlFile/classify/primary_unit_declaration.py +++ b/vsg/vhdlFile/classify/primary_unit_declaration.py @@ -2,23 +2,18 @@ from vsg import decorators from vsg.token import primary_unit_declaration as token -from vsg.vhdlFile import utils @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ primary_unit_declaration ::= identifier; """ - return classify(iToken, lObjects) + return classify(oDataStructure) @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = iToken - - while not utils.is_next_token(";", iCurrent, lObjects): - iCurrent = utils.assign_next_token(token.identifier, iCurrent, lObjects) - iCurrent = utils.assign_token(lObjects, iCurrent, token.semicolon) - - return iCurrent +def classify(oDataStructure): + while not oDataStructure.is_next_token(";"): + oDataStructure.replace_current_token_with(token.identifier) + oDataStructure.replace_current_token_with(token.semicolon) diff --git a/vsg/vhdlFile/classify/secondary_unit_declaration.py b/vsg/vhdlFile/classify/secondary_unit_declaration.py index 075686d80..26e5de4ea 100644 --- a/vsg/vhdlFile/classify/secondary_unit_declaration.py +++ b/vsg/vhdlFile/classify/secondary_unit_declaration.py @@ -2,27 +2,24 @@ from vsg import decorators from vsg.token import secondary_unit_declaration as token -from vsg.vhdlFile import utils @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ secondary_unit_declaration ::= identifier = physical_literal; """ - if utils.find_in_range("=", iToken, ";", lObjects): - return classify(iToken, lObjects) - return iToken + if oDataStructure.does_string_exist_before_string("=", ";"): + classify(oDataStructure) + return True + return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = iToken - iCurrent = utils.assign_next_token(token.identifier, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.equal_sign, iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with(token.identifier) + oDataStructure.replace_next_token_with(token.equal_sign) - while not utils.is_next_token(";", iCurrent, lObjects): - iCurrent = utils.assign_next_token(token.physical_literal, iCurrent, lObjects) - iCurrent = utils.assign_token(lObjects, iCurrent, token.semicolon) - - return iCurrent + while not oDataStructure.is_next_token(";"): + oDataStructure.replace_current_token_with(token.physical_literal) + oDataStructure.replace_current_token_with(token.semicolon) From d8e735a0179cd7f96b5fecc4c941c9a2fd25348a Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 7 Apr 2025 21:48:08 -0500 Subject: [PATCH 088/124] function_specification classify test pass --- vsg/vhdlFile/classify/subprogram_header.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/vsg/vhdlFile/classify/subprogram_header.py b/vsg/vhdlFile/classify/subprogram_header.py index fc6e22e2e..c54d4928f 100644 --- a/vsg/vhdlFile/classify/subprogram_header.py +++ b/vsg/vhdlFile/classify/subprogram_header.py @@ -15,21 +15,19 @@ def detect(oDataStructure): """ if oDataStructure.is_next_token("generic"): - classify(iToken, lObjects) + classify(oDataStructure) return True return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - if utils.find_in_next_n_tokens("(", 2, iToken, lObjects): - iCurrent = utils.assign_next_token_required("generic", token.generic_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iCurrent, lObjects) +def classify(oDataStructure): + if oDataStructure.does_string_exist_in_next_n_tokens("(", 2): + oDataStructure.replace_next_token_required("generic", token.generic_keyword) + oDataStructure.replace_next_token_required("(", token.open_parenthesis) - iCurrent = generic_list.classify(iCurrent, lObjects) + generic_list.classify(oDataStructure) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) + oDataStructure.replace_next_token_required(")", token.close_parenthesis) - iCurrent = generic_map_aspect.detect(iToken, lObjects) - - return iCurrent + generic_map_aspect.detect(oDataStructure) From 10304d647163691788e2f2200e3ea9ffe4521e6b Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 7 Apr 2025 21:50:36 -0500 Subject: [PATCH 089/124] if_generate_statement classify test pass --- vsg/token/if_generate_statement.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vsg/token/if_generate_statement.py b/vsg/token/if_generate_statement.py index 34e991670..99c427acf 100644 --- a/vsg/token/if_generate_statement.py +++ b/vsg/token/if_generate_statement.py @@ -39,13 +39,12 @@ def __init__(self, sString): super().__init__(sString) -# TODO: This colon may not have a test class alternative_label_colon(parser.label_colon): """ unique_id = if_generate_statement : alternative_label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() From 5b904539234822fdf6056365506d91d156b36b2e Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Mon, 7 Apr 2025 21:52:23 -0500 Subject: [PATCH 090/124] if_statement classify test pass --- vsg/token/if_statement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsg/token/if_statement.py b/vsg/token/if_statement.py index 69b093842..24385c4b2 100644 --- a/vsg/token/if_statement.py +++ b/vsg/token/if_statement.py @@ -16,7 +16,7 @@ class label_colon(parser.label_colon): unique_id = if_statement : label_colon """ - def __init__(self): + def __init__(self, sString=None): super().__init__() From 005bab221e1c9f79703690efa44575a3c9f5a4d1 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Tue, 8 Apr 2025 06:36:43 -0500 Subject: [PATCH 091/124] interface_function_specification classify test pass --- .../classify/interface_declaration.py | 30 +++++-------------- vsg/vhdlFile/classify/interface_list.py | 2 +- .../interface_subprogram_declaration.py | 19 +++--------- .../classify/interface_subprogram_default.py | 11 +++---- .../classify/interface_type_declaration.py | 3 +- 5 files changed, 20 insertions(+), 45 deletions(-) diff --git a/vsg/vhdlFile/classify/interface_declaration.py b/vsg/vhdlFile/classify/interface_declaration.py index e70d497b4..84e7d6fb4 100644 --- a/vsg/vhdlFile/classify/interface_declaration.py +++ b/vsg/vhdlFile/classify/interface_declaration.py @@ -20,34 +20,18 @@ def detect(oDataStructure): """ if interface_object_declaration.detect(oDataStructure): - return interface_object_declaration.classify(oDataStructure) + interface_object_declaration.classify(oDataStructure) + return True if interface_type_declaration.detect(oDataStructure): - return interface_type_declaration.classify(oDataStructure) + return True if interface_subprogram_declaration.detect(oDataStructure): - return interface_subprogram_declaration.classify(oDataStructure) + interface_subprogram_declaration.classify(oDataStructure) + return True if interface_package_declaration.detect(oDataStructure): - return interface_package_declaration.classify(oDataStructure) + interface_package_declaration.classify(oDataStructure) + return True return False - - -# iCurrent = interface_object_declaration.detect(iToken, lObjects) -# if iCurrent != iToken: -# return iCurrent -# -# iCurrent = interface_type_declaration.detect(iToken, lObjects) -# if iCurrent != iToken: -# return iCurrent -# -# iCurrent = interface_subprogram_declaration.detect(iToken, lObjects) -# if iCurrent != iToken: -# return iCurrent -# -# iCurrent = interface_package_declaration.detect(iToken, lObjects) -# if iCurrent != iToken: -# return iCurrent -# -# return iToken diff --git a/vsg/vhdlFile/classify/interface_list.py b/vsg/vhdlFile/classify/interface_list.py index 8a9c546aa..93c0e4093 100644 --- a/vsg/vhdlFile/classify/interface_list.py +++ b/vsg/vhdlFile/classify/interface_list.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import interface_list as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import interface_element @@ -17,4 +16,5 @@ def classify(oDataStructure): while oDataStructure.is_next_token(";"): oDataStructure.replace_next_token_with(token.semicolon) + interface_element.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/interface_subprogram_declaration.py b/vsg/vhdlFile/classify/interface_subprogram_declaration.py index edb313713..0310f3068 100644 --- a/vsg/vhdlFile/classify/interface_subprogram_declaration.py +++ b/vsg/vhdlFile/classify/interface_subprogram_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import interface_subprogram_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( interface_subprogram_default, interface_subprogram_specification, @@ -15,24 +14,14 @@ def detect(oDataStructure): interface_subprogram_declaration ::= interface_subprogram_specification [ is interface_subprogram_default ] """ - # iCurrent = utils.find_next_token(iToken, lObjects) - # iLast = iCurrent - # iCurrent = interface_subprogram_specification.detect(iCurrent, lObjects) - # if iLast != iCurrent: - # iCurrent = utils.find_next_token(iToken, lObjects) - # if utils.object_value_is(lObjects, iCurrent, "is"): - # return classify(iCurrent, lObjects) - # return iToken if interface_subprogram_specification.detect(oDataStructure): - oDataStructure.increment_seek_index() - return oDataStructure.is_next_seek_token("is") + return oDataStructure.is_next_token("is") return False @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_if("is", token.is_keyword, iToken, lObjects) - iCurrent = interface_subprogram_default.classify(iCurrent, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_with_if("is", token.is_keyword) - return iCurrent + interface_subprogram_default.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/interface_subprogram_default.py b/vsg/vhdlFile/classify/interface_subprogram_default.py index e3494c4e8..4223b8288 100644 --- a/vsg/vhdlFile/classify/interface_subprogram_default.py +++ b/vsg/vhdlFile/classify/interface_subprogram_default.py @@ -2,15 +2,16 @@ from vsg import decorators from vsg.token import interface_subprogram_default as token -from vsg.vhdlFile import utils @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): +def classify(oDataStructure): """ interface_subprogram_default ::= *subprogram*_name | <> """ - if utils.is_next_token("<>", iToken, lObjects): - return utils.assign_next_token_required("<>", token.undefined_range, iToken, lObjects) - return utils.classify_next_token(token.subprogram_name, iToken, lObjects) + + if oDataStructure.is_next_token("<>"): + oDataStructure.replace_next_token_with(token.undefined_range) + else: + oDataStructure.replace_next_token_with(token.subprogram_name) diff --git a/vsg/vhdlFile/classify/interface_type_declaration.py b/vsg/vhdlFile/classify/interface_type_declaration.py index 381711381..2713bb60e 100644 --- a/vsg/vhdlFile/classify/interface_type_declaration.py +++ b/vsg/vhdlFile/classify/interface_type_declaration.py @@ -12,6 +12,7 @@ def detect(oDataStructure): """ if interface_incomplete_type_declaration.detect(oDataStructure): - return interface_incomplete_type_declaration.classify(oDataStructure) + interface_incomplete_type_declaration.classify(oDataStructure) + return True return False From 0fb090c160c3e64606f353fc7ef2bb357e7376b6 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Tue, 8 Apr 2025 06:44:55 -0500 Subject: [PATCH 092/124] interface_package_declaration classify test pass --- .../classify/interface_package_declaration.py | 17 ++++------ .../interface_package_generic_map_aspect.py | 32 +++++++++---------- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/vsg/vhdlFile/classify/interface_package_declaration.py b/vsg/vhdlFile/classify/interface_package_declaration.py index 52ade5204..a05ed0512 100644 --- a/vsg/vhdlFile/classify/interface_package_declaration.py +++ b/vsg/vhdlFile/classify/interface_package_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import interface_package_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier, interface_package_generic_map_aspect @@ -17,15 +16,13 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("package", token.package_keyword, iToken, lObjects) +def classify(oDataStructure): + oDataStructure.replace_next_token_required("package", token.package_keyword) - iCurrent = identifier.classify(iCurrent, lObjects) + identifier.classify(oDataStructure) - iCurrent = utils.assign_next_token_required("is", token.is_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required("new", token.new_keyword, iCurrent, lObjects) - iCurrent = utils.assign_next_token(token.uninstantiated_package_name, iCurrent, lObjects) + oDataStructure.replace_next_token_required("is", token.is_keyword) + oDataStructure.replace_next_token_required("new", token.new_keyword) + oDataStructure.replace_next_token_with(token.uninstantiated_package_name) - iCurrent = interface_package_generic_map_aspect.detect(iCurrent, lObjects) - - return iCurrent + interface_package_generic_map_aspect.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/interface_package_generic_map_aspect.py b/vsg/vhdlFile/classify/interface_package_generic_map_aspect.py index 4b079e0e9..7c8fca3ed 100644 --- a/vsg/vhdlFile/classify/interface_package_generic_map_aspect.py +++ b/vsg/vhdlFile/classify/interface_package_generic_map_aspect.py @@ -2,34 +2,32 @@ from vsg import decorators from vsg.token import interface_package_generic_map_aspect as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_map_aspect @decorators.print_classifier_debug_info(__name__) -def detect(iToken, lObjects): +def detect(oDataStructure): """ interface_package_generic_map_aspect ::= generic_map_aspect | generic map ( <> ) | generic map ( default ) """ - if utils.are_next_consecutive_tokens(["generic", "map", "(", "<>"], iToken, lObjects): - return classify(iToken, lObjects) - elif utils.are_next_consecutive_tokens(["generic", "map", "(", "default"], iToken, lObjects): - return classify(iToken, lObjects) + if oDataStructure.are_next_consecutive_tokens(["generic", "map", "(", "<>"]): + classify(oDataStructure) + return True + elif oDataStructure.are_next_consecutive_tokens(["generic", "map", "(", "default"]): + classify(oDataStructure) + return True else: - return generic_map_aspect.classify(iToken, lObjects) - return iToken + return generic_map_aspect.detect(oDataStructure) @decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - iCurrent = utils.assign_next_token_required("generic", token.generic_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("map", token.map_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iToken, lObjects) - iCurrent = utils.assign_next_token_if("default", token.default_keyword, iToken, lObjects) - iCurrent = utils.assign_next_token_if("<>", token.undefined_range, iToken, lObjects) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iToken, lObjects) - - return iCurrent +def classify(oDataStructure): + oDataStructure.replace_next_token_required("generic", token.generic_keyword) + oDataStructure.replace_next_token_required("map", token.map_keyword) + oDataStructure.replace_next_token_required("(", token.open_parenthesis) + oDataStructure.replace_next_token_with_if("default", token.default_keyword) + oDataStructure.replace_next_token_with_if("<>", token.undefined_range) + oDataStructure.replace_next_token_required(")", token.close_parenthesis) From ef8990025896be433fdc8abb018e5a5f902daea6 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Tue, 8 Apr 2025 06:46:52 -0500 Subject: [PATCH 093/124] package_header classify test pass --- vsg/vhdlFile/classify/package_header.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsg/vhdlFile/classify/package_header.py b/vsg/vhdlFile/classify/package_header.py index a87fb4c0c..7012afa3c 100644 --- a/vsg/vhdlFile/classify/package_header.py +++ b/vsg/vhdlFile/classify/package_header.py @@ -16,6 +16,6 @@ def detect(oDataStructure): if generic_clause.detect(oDataStructure): generic_clause.classify(oDataStructure) if generic_map_aspect.detect(oDataStructure): - oDataStructure.assign_next_token_required(";", token.semicolon) + oDataStructure.replace_next_token_required(";", token.semicolon) return True return False From bf4558341563b21320d0b8818efddbf6e132f828 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 9 Apr 2025 21:23:33 -0500 Subject: [PATCH 094/124] Interim commit for subtype_declaration classify test --- vsg/data_structure.py | 32 +++++++++++++++---- vsg/vhdlFile/classify/array_constraint.py | 2 ++ vsg/vhdlFile/classify/association_element.py | 2 +- vsg/vhdlFile/classify/discrete_range.py | 12 ++++++- vsg/vhdlFile/classify/index_constraint.py | 2 +- vsg/vhdlFile/classify/range.py | 8 +++-- vsg/vhdlFile/classify/record_constraint.py | 1 + .../classify/resolution_indication.py | 12 +++---- 8 files changed, 52 insertions(+), 19 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 186445b8f..e8f130705 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -13,7 +13,9 @@ def __init__(self, lAllObjects): self.iEndIndex = len(lAllObjects) - 1 self.sFilename = "" self.iCurrent = 0 + self.lCurrent = [] self.iSeek = 0 + self.lSeek = [] def advance_seek_index_to_current_index(self): if self.iSeek < self.iCurrent: @@ -23,6 +25,7 @@ def advance_to_next_token(self): for iIndex, oToken in enumerate(self.lAllObjects[self.iCurrent : :]): if type(oToken) == parser.item: self.iCurrent = self.iCurrent + iIndex +# self.align_seek_index() return True return False @@ -36,17 +39,21 @@ def advance_to_next_seek_token(self): def align_seek_index(self): self.iSeek = self.iCurrent - def are_next_consecutive_tokens(self, lTokens): - self.align_seek_index() + def are_next_consecutive_tokens(self, lTokens, bAlignSeekIndex=True): + # TODO: Remove bAlignSeekIndex. This decision should be made at a higher level + if bAlignSeekIndex: + self.align_seek_index() myIndex = self.iSeek for sToken in lTokens: self.seek_to_next_token() if sToken is not None: if not self.seek_token_lower_value_is(sToken): - self.align_seek_index() + if bAlignSeekIndex: + self.align_seek_index() return False self.increment_seek_index() - self.align_seek_index() + if bAlignSeekIndex: + self.align_seek_index() return True def at_end_of_file(self): @@ -70,12 +77,12 @@ def does_string_exist_before_string(self, sFirst, sSecond): def does_string_exist_before_matching_close_parenthesis(self, sString, myParen=0): iParen = myParen for oToken in self.lAllObjects[self.iSeek : :]: - if iParen == 0 and oToken.lower_value == sString: - return True if oToken.lower_value == "(": iParen += 1 elif oToken.lower_value == ")": iParen -= 1 + if iParen == 0 and oToken.lower_value == sString: + return True if iParen == -1: return False return False @@ -171,6 +178,7 @@ def remove_token_at_offset(self, iOffset): def replace_current_token_with(self, token): self.lAllObjects[self.iCurrent] = token(self.get_current_token_value()) self.increment_current_index() +# self.align_seek_index() def replace_current_token_with_list_of_tokens(self, lTokens): self.lAllObjects.pop(self.get_current_index()) @@ -240,3 +248,15 @@ def debug_seek_print(self, iNumTokens): for oToken in self.lAllObjects[self.iSeek : self.iSeek + iNumTokens]: sOutput += oToken.get_value() print(f">>Seek[{sOutput}]<<") + + def push_seek_index(self): + self.lSeek.append(self.iSeek) + + def pop_seek_index(self): + self.iSeek = self.lSeek.pop() + + def push_current_index(self): + self.lCurrent.append(self.iCurrent) + + def pop_current_index(self): + self.iCurrent = self.lCurrent.pop() diff --git a/vsg/vhdlFile/classify/array_constraint.py b/vsg/vhdlFile/classify/array_constraint.py index 4718045f1..1e8adc8e2 100644 --- a/vsg/vhdlFile/classify/array_constraint.py +++ b/vsg/vhdlFile/classify/array_constraint.py @@ -13,10 +13,12 @@ def detect(oDataStructure): | ( open ) [ array_element_constraint ] """ + oDataStructure.push_seek_index() if open_detected(oDataStructure): classify_open(oDataStructure) array_element_constraint.detect(oDataStructure) return True + oDataStructure.pop_seek_index() if index_constraint.detect(oDataStructure): index_constraint.classify(oDataStructure) array_element_constraint.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/association_element.py b/vsg/vhdlFile/classify/association_element.py index 7d723ddac..a78f5a8f1 100644 --- a/vsg/vhdlFile/classify/association_element.py +++ b/vsg/vhdlFile/classify/association_element.py @@ -17,7 +17,7 @@ def detect(oDataStructure): """ iParen = 1 - oDataStructure.align_seek_index() +# oDataStructure.align_seek_index() while not oDataStructure.is_next_seek_token(";"): oDataStructure.advance_to_next_seek_token() if oDataStructure.seek_token_lower_value_is("("): diff --git a/vsg/vhdlFile/classify/discrete_range.py b/vsg/vhdlFile/classify/discrete_range.py index 75f1aee47..b4c8b4d96 100644 --- a/vsg/vhdlFile/classify/discrete_range.py +++ b/vsg/vhdlFile/classify/discrete_range.py @@ -11,9 +11,19 @@ def detect(oDataStructure): discrete_range ::= *discrete*_subtype_indication | range """ - if oDataStructure.are_next_consecutive_tokens([None, "(", None, ")"]): + oDataStructure.push_seek_index() + + if oDataStructure.are_next_consecutive_tokens([None, "(", None, ")"], False): + oDataStructure.pop_seek_index() + oDataStructure.push_current_index() + oDataStructure.iCurrent = oDataStructure.iSeek + subtype_indication.classify(oDataStructure) + + oDataStructure.pop_current_index() return True + + oDataStructure.pop_seek_index() return range.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/index_constraint.py b/vsg/vhdlFile/classify/index_constraint.py index cc56a2d11..fa68bb41f 100644 --- a/vsg/vhdlFile/classify/index_constraint.py +++ b/vsg/vhdlFile/classify/index_constraint.py @@ -11,7 +11,7 @@ def detect(oDataStructure): index_constraint ::= ( discrete_range { , discrete_range } ) """ - oDataStructure.align_seek_index() # TODO: Is this necessary? + if oDataStructure.is_next_seek_token("("): oDataStructure.increment_seek_index() if discrete_range.detect(oDataStructure): diff --git a/vsg/vhdlFile/classify/range.py b/vsg/vhdlFile/classify/range.py index a6167a52c..9204c9b56 100644 --- a/vsg/vhdlFile/classify/range.py +++ b/vsg/vhdlFile/classify/range.py @@ -11,19 +11,21 @@ def detect(oDataStructure): *range*_attribute_name | simple_expression direction simple_expression """ + oDataStructure.push_seek_index() if oDataStructure.are_next_consecutive_tokens(["(", None, ")"]): return True # TODO: move mySeek into oDataStructure - mySeek = oDataStructure.iSeek + oDataStructure.pop_seek_index() + oDataStructure.push_seek_index() if attribute_name.detect(oDataStructure): return True - oDataStructure.iSeek = mySeek + oDataStructure.pop_seek_index() return detect_direction(oDataStructure) @decorators.print_classifier_debug_info(__name__) def detect_direction(oDataStructure): - # oDataStructure.align_seek_index() + if oDataStructure.does_string_exist_before_matching_close_parenthesis("downto", 0): return True if oDataStructure.does_string_exist_before_matching_close_parenthesis("to", 0): diff --git a/vsg/vhdlFile/classify/record_constraint.py b/vsg/vhdlFile/classify/record_constraint.py index 15f5c1eba..40c84e34c 100644 --- a/vsg/vhdlFile/classify/record_constraint.py +++ b/vsg/vhdlFile/classify/record_constraint.py @@ -26,6 +26,7 @@ def classify(oDataStructure): oDataStructure.replace_next_token_required("(", token.open_parenthesis) while not oDataStructure.is_next_token(")"): + record_element_constraint.classify(oDataStructure) oDataStructure.replace_next_token_with_if(",", token.comma) oDataStructure.replace_next_token_required(")", token.close_parenthesis) diff --git a/vsg/vhdlFile/classify/resolution_indication.py b/vsg/vhdlFile/classify/resolution_indication.py index e4f5c9b17..9b2a0d651 100644 --- a/vsg/vhdlFile/classify/resolution_indication.py +++ b/vsg/vhdlFile/classify/resolution_indication.py @@ -2,7 +2,7 @@ from vsg import decorators, parser from vsg.token import resolution_indication as token -from vsg.vhdlFile import utils +from vsg.vhdlFile.classify import utils @decorators.print_classifier_debug_info(__name__) @@ -23,12 +23,10 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) -def classify_element_resolution(iToken, lObjects): - iCurrent = utils.assign_next_token_required("(", token.open_parenthesis, iToken, lObjects) - iCurrent = utils.assign_tokens_until_matching_closing_paren(parser.todo, iCurrent, lObjects) - iCurrent = utils.assign_next_token_required(")", token.close_parenthesis, iCurrent, lObjects) - - return iCurrent +def classify_element_resolution(oDataStructure): + oDataStructure.replace_next_token_required("(", token.open_parenthesis) + utils.assign_tokens_until_matching_closing_paren(parser.todo, oDataStructure) + oDataStructure.replace_next_token_required(")", token.close_parenthesis) @decorators.print_classifier_debug_info(__name__) From 9f8157d6a74a49ac6ef87f3878e86200b584691d Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 9 Apr 2025 21:28:07 -0500 Subject: [PATCH 095/124] Removing commented out code. --- vsg/vhdlFile/classify/association_element.py | 1 - 1 file changed, 1 deletion(-) diff --git a/vsg/vhdlFile/classify/association_element.py b/vsg/vhdlFile/classify/association_element.py index a78f5a8f1..0177a2eb1 100644 --- a/vsg/vhdlFile/classify/association_element.py +++ b/vsg/vhdlFile/classify/association_element.py @@ -17,7 +17,6 @@ def detect(oDataStructure): """ iParen = 1 -# oDataStructure.align_seek_index() while not oDataStructure.is_next_seek_token(";"): oDataStructure.advance_to_next_seek_token() if oDataStructure.seek_token_lower_value_is("("): From 2d3c1c739b86e8d07fe3dcf1b60e226df0c08852 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 9 Apr 2025 21:28:22 -0500 Subject: [PATCH 096/124] Removing align_seek_index. --- vsg/vhdlFile/classify/bit_string_literal.py | 1 - 1 file changed, 1 deletion(-) diff --git a/vsg/vhdlFile/classify/bit_string_literal.py b/vsg/vhdlFile/classify/bit_string_literal.py index 0bea395ec..65e7ce3dc 100644 --- a/vsg/vhdlFile/classify/bit_string_literal.py +++ b/vsg/vhdlFile/classify/bit_string_literal.py @@ -16,7 +16,6 @@ def detect(oDataStructure): bit_string_literal ::= [ integer ] base_specifier " [ bit_value ] " """ - oDataStructure.align_seek_index() bInt = False if oDataStructure.does_seek_token_match_regex(oIntegerRegex): oDataStructure.increment_seek_index() From 3059cea0288028f42f9b7139776ff0ac840ecc4d Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 9 Apr 2025 21:30:13 -0500 Subject: [PATCH 097/124] Removing unused align_seek_index. --- vsg/vhdlFile/classify/character_literal.py | 1 - 1 file changed, 1 deletion(-) diff --git a/vsg/vhdlFile/classify/character_literal.py b/vsg/vhdlFile/classify/character_literal.py index c5736d22e..639b2fa8c 100644 --- a/vsg/vhdlFile/classify/character_literal.py +++ b/vsg/vhdlFile/classify/character_literal.py @@ -9,7 +9,6 @@ def detect(oDataStructure): character_literal ::= ' graphic_character ' """ - oDataStructure.align_seek_index() oDataStructure.advance_to_next_seek_token() sValue = oDataStructure.get_seek_token_lower_value() if len(sValue) == 3 and sValue.startswith("'") and sValue.endswith("'"): From 4df26db113341e42b2de45ef4af31688f970ef9b Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 9 Apr 2025 21:35:06 -0500 Subject: [PATCH 098/124] Removed unused align_seek_index --- vsg/vhdlFile/classify/component_instantiation_statement.py | 1 - 1 file changed, 1 deletion(-) diff --git a/vsg/vhdlFile/classify/component_instantiation_statement.py b/vsg/vhdlFile/classify/component_instantiation_statement.py index bb6680f84..295ce2032 100644 --- a/vsg/vhdlFile/classify/component_instantiation_statement.py +++ b/vsg/vhdlFile/classify/component_instantiation_statement.py @@ -20,7 +20,6 @@ def detect(oDataStructure): [ port_map_aspect ] ; """ if oDataStructure.are_next_consecutive_tokens([None, ":"]): - oDataStructure.align_seek_index() oDataStructure.advance_to_next_seek_token() oDataStructure.increment_seek_index() oDataStructure.advance_to_next_seek_token() From 28dfb19555a54b624f457a6609c77e82049cff43 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 9 Apr 2025 21:45:01 -0500 Subject: [PATCH 099/124] Removed align_seek_index. --- .../classify/concurrent_signal_assignment_statement.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py b/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py index 2b9924f4f..7d80efcd9 100644 --- a/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py +++ b/vsg/vhdlFile/classify/concurrent_signal_assignment_statement.py @@ -19,25 +19,28 @@ def detect(oDataStructure): | [ label : ] [ postponed ] concurrent_selected_signal_assignment """ - oDataStructure.align_seek_index() + oDataStructure.push_seek_index() if concurrent_selected_signal_assignment.detect(oDataStructure): utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) utils.tokenize_postponed(oDataStructure, token.postponed_keyword) concurrent_selected_signal_assignment.classify(oDataStructure) return True - oDataStructure.align_seek_index() + oDataStructure.pop_seek_index() + oDataStructure.push_seek_index() if concurrent_conditional_signal_assignment.detect(oDataStructure): utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) utils.tokenize_postponed(oDataStructure, token.postponed_keyword) concurrent_conditional_signal_assignment.classify(oDataStructure) return True - oDataStructure.align_seek_index() + oDataStructure.pop_seek_index() + oDataStructure.push_seek_index() if concurrent_simple_signal_assignment.detect(oDataStructure): utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) utils.tokenize_postponed(oDataStructure, token.postponed_keyword) concurrent_simple_signal_assignment.classify(oDataStructure) return True + oDataStructure.pop_seek_index() return False From 291e92f1d08f35bffeb34989f920722160b2f668 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 9 Apr 2025 21:47:48 -0500 Subject: [PATCH 100/124] Removing align_seek_index --- vsg/vhdlFile/classify/loop_statement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsg/vhdlFile/classify/loop_statement.py b/vsg/vhdlFile/classify/loop_statement.py index ac3eb6a89..1fb4c694a 100644 --- a/vsg/vhdlFile/classify/loop_statement.py +++ b/vsg/vhdlFile/classify/loop_statement.py @@ -14,7 +14,7 @@ def detect(oDataStructure): sequence_of_statements end loop [ loop_label ] ; """ - oDataStructure.align_seek_index() + if oDataStructure.are_next_consecutive_tokens([None, ":"]): oDataStructure.increment_seek_index() oDataStructure.advance_to_next_seek_token() From 707c837999ee69e773d0fb7ac37a7cda6f0f7628 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 9 Apr 2025 21:50:29 -0500 Subject: [PATCH 101/124] Removing align_seek_index --- vsg/vhdlFile/classify/procedure_call.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vsg/vhdlFile/classify/procedure_call.py b/vsg/vhdlFile/classify/procedure_call.py index 1d1c4b381..60e494e62 100644 --- a/vsg/vhdlFile/classify/procedure_call.py +++ b/vsg/vhdlFile/classify/procedure_call.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import procedure_call as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import actual_parameter_part lExceptions = ["end", "map", "component", "entity", "configuration", "if"] @@ -27,10 +26,11 @@ def detect(oDataStructure): Differentiating a procedure call from anything else is essentially the absence of keywords. """ - oDataStructure.align_seek_index() + oDataStructure.push_seek_index() if oDataStructure.does_string_exist_before_string_honoring_parenthesis_hierarchy("<=", ";"): return False - oDataStructure.align_seek_index() + + oDataStructure.pop_seek_index() while not oDataStructure.seek_token_lower_value_is(";"): if oDataStructure.get_seek_token_lower_value() in lExceptions: return False From ed9168e87790814a19d388a8b1c743051dccab39 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 9 Apr 2025 21:57:55 -0500 Subject: [PATCH 102/124] Removing align_seek_index --- vsg/vhdlFile/classify/signal_kind.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsg/vhdlFile/classify/signal_kind.py b/vsg/vhdlFile/classify/signal_kind.py index 73c80e12f..90f556ae1 100644 --- a/vsg/vhdlFile/classify/signal_kind.py +++ b/vsg/vhdlFile/classify/signal_kind.py @@ -10,7 +10,7 @@ def detect(oDataStructure): signal_kind ::= register | bus """ - oDataStructure.align_seek_index() + if oDataStructure.is_next_seek_token_one_of(["register", "bus"]): classify(oDataStructure) return True From c7880cf2a2a1f3522b19c50c568297393792fb5f Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 9 Apr 2025 22:28:17 -0500 Subject: [PATCH 103/124] Adding marking of seek token. --- vsg/data_structure.py | 13 ++++++++----- vsg/vhdlFile/classify/association_element.py | 6 ++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index e8f130705..4463a5380 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -100,9 +100,9 @@ def does_string_exist_before_string_honoring_parenthesis_hierarchy(self, sFirst, return True return False - def does_string_exist_before_seek_index_honoring_parenthesis_hierarchy(self, sString): + def does_string_exist_before_mark_index_honoring_parenthesis_hierarchy(self, sString): iParen = 0 - for iIndex in range(self.get_current_index(), self.get_seek_index()): + for iIndex in range(self.get_current_index(), self.iMark): if self.lAllObjects[iIndex].lower_value == "(": iParen += 1 elif self.lAllObjects[iIndex].lower_value == ")": @@ -178,7 +178,7 @@ def remove_token_at_offset(self, iOffset): def replace_current_token_with(self, token): self.lAllObjects[self.iCurrent] = token(self.get_current_token_value()) self.increment_current_index() -# self.align_seek_index() + self.align_seek_index() def replace_current_token_with_list_of_tokens(self, lTokens): self.lAllObjects.pop(self.get_current_index()) @@ -204,8 +204,8 @@ def replace_next_token_with_if_not(self, sString, token): if not self.current_token_lower_value_is(sString): self.replace_current_token_with(token) - def replace_tokens_from_current_to_seek_with(self, token): - while self.get_current_index() < self.get_seek_index(): + def replace_tokens_from_current_to_mark_with(self, token): + while self.get_current_index() < self.iMark: self.replace_next_token_with(token) self.advance_to_next_token() @@ -260,3 +260,6 @@ def push_current_index(self): def pop_current_index(self): self.iCurrent = self.lCurrent.pop() + + def set_mark_index(self): + self.iMark = self.iSeek diff --git a/vsg/vhdlFile/classify/association_element.py b/vsg/vhdlFile/classify/association_element.py index 0177a2eb1..ed7fff8da 100644 --- a/vsg/vhdlFile/classify/association_element.py +++ b/vsg/vhdlFile/classify/association_element.py @@ -36,17 +36,19 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): + oDataStructure.set_mark_index() + classify_formal_part(oDataStructure) classify_actual_part(oDataStructure) @decorators.print_classifier_debug_info(__name__) def classify_formal_part(oDataStructure): - if oDataStructure.does_string_exist_before_seek_index_honoring_parenthesis_hierarchy("=>"): + if oDataStructure.does_string_exist_before_mark_index_honoring_parenthesis_hierarchy("=>"): formal_part.classify(oDataStructure, token.formal_part) oDataStructure.replace_next_token_with(token.assignment) @decorators.print_classifier_debug_info(__name__) def classify_actual_part(oDataStructure): - oDataStructure.replace_tokens_from_current_to_seek_with(token.actual_part) + oDataStructure.replace_tokens_from_current_to_mark_with(token.actual_part) From 37d9c9779c64429f17733a1c534b4231676b14eb Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 9 Apr 2025 22:54:29 -0500 Subject: [PATCH 104/124] Removing align_seek_index --- vsg/vhdlFile/classify/signal_assignment_statement.py | 9 +++++++++ vsg/vhdlFile/classify/simple_signal_assignment.py | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/vsg/vhdlFile/classify/signal_assignment_statement.py b/vsg/vhdlFile/classify/signal_assignment_statement.py index 36d90a1c8..50e8aa7aa 100644 --- a/vsg/vhdlFile/classify/signal_assignment_statement.py +++ b/vsg/vhdlFile/classify/signal_assignment_statement.py @@ -19,19 +19,28 @@ def detect(oDataStructure): | [ label : ] selected_signal_assignment """ + oDataStructure.push_seek_index() if selected_signal_assignment.detect(oDataStructure): utils.tokenize_label(oDataStructure, token.label, token.label_colon) selected_signal_assignment.classify(oDataStructure) + oDataStructure.pop_seek_index() return True + oDataStructure.pop_seek_index() + oDataStructure.push_seek_index() if conditional_signal_assignment.detect(oDataStructure): utils.tokenize_label(oDataStructure, token.label, token.label_colon) conditional_signal_assignment.classify(oDataStructure) + oDataStructure.pop_seek_index() return True + oDataStructure.pop_seek_index() + oDataStructure.push_seek_index() if simple_signal_assignment.detect(oDataStructure): utils.tokenize_label(oDataStructure, token.label, token.label_colon) simple_signal_assignment.classify(oDataStructure) + oDataStructure.pop_seek_index() return True + oDataStructure.pop_seek_index() return False diff --git a/vsg/vhdlFile/classify/simple_signal_assignment.py b/vsg/vhdlFile/classify/simple_signal_assignment.py index c5ae1cdb8..8a2510a2f 100644 --- a/vsg/vhdlFile/classify/simple_signal_assignment.py +++ b/vsg/vhdlFile/classify/simple_signal_assignment.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg import decorators -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( simple_force_assignment, simple_release_assignment, @@ -20,7 +19,7 @@ def detect(oDataStructure): if oDataStructure.is_next_token_one_of(["if", "elsif", "else"]): return False - oDataStructure.align_seek_index() + if oDataStructure.does_string_exist_before_string_honoring_parenthesis_hierarchy("<=", ";"): if oDataStructure.does_string_exist_before_string("with", ";"): return False From 5a11075f3987883bf5519b7b6746463ff1d327ae Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Wed, 9 Apr 2025 23:01:07 -0500 Subject: [PATCH 105/124] Removing align_seek_index --- vsg/vhdlFile/classify/array_constraint.py | 1 - vsg/vhdlFile/classify/constraint.py | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/vsg/vhdlFile/classify/array_constraint.py b/vsg/vhdlFile/classify/array_constraint.py index 1e8adc8e2..008779e94 100644 --- a/vsg/vhdlFile/classify/array_constraint.py +++ b/vsg/vhdlFile/classify/array_constraint.py @@ -28,7 +28,6 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) def detect_discrete_subtype_indication(oDataStructure): - oDataStructure.align_seek_index() if oDataStructure.is_next_seek_token("("): index_constraint.classify(oDataStructure) return True diff --git a/vsg/vhdlFile/classify/constraint.py b/vsg/vhdlFile/classify/constraint.py index e9ea959ba..8b506f6cc 100644 --- a/vsg/vhdlFile/classify/constraint.py +++ b/vsg/vhdlFile/classify/constraint.py @@ -13,13 +13,28 @@ def detect(oDataStructure): | record_constraint """ + oDataStructure.push_seek_index() if range_constraint.detect(oDataStructure): + oDataStructure.pop_seek_index() return True + oDataStructure.pop_seek_index() + oDataStructure.push_seek_index() if array_constraint.detect(oDataStructure): + oDataStructure.pop_seek_index() return True + oDataStructure.pop_seek_index() + oDataStructure.push_seek_index() if record_constraint.detect(oDataStructure): + oDataStructure.pop_seek_index() return True - return array_constraint.detect_discrete_subtype_indication(oDataStructure) + oDataStructure.pop_seek_index() + oDataStructure.push_seek_index() + if array_constraint.detect_discrete_subtype_indication(oDataStructure): + oDataStructure.pop_seek_index() + return True + + oDataStructure.pop_seek_index() + return False From 0e1b1e4f6f707d6984ed8e1dec36036468bf87a4 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 10 Apr 2025 06:44:36 -0500 Subject: [PATCH 106/124] Removing align_seek_index --- vsg/vhdlFile/classify/element_constraint.py | 11 ++++++++++- vsg/vhdlFile/classify/record_constraint.py | 3 +-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/vsg/vhdlFile/classify/element_constraint.py b/vsg/vhdlFile/classify/element_constraint.py index 2de4636b9..2f9b0c7b0 100644 --- a/vsg/vhdlFile/classify/element_constraint.py +++ b/vsg/vhdlFile/classify/element_constraint.py @@ -12,7 +12,16 @@ def detect(oDataStructure): | record_constraint """ + oDataStructure.push_seek_index() if array_constraint.detect(oDataStructure): + oDataStructure.pop_seek_index() return True - return record_constraint.detect(oDataStructure) + oDataStructure.pop_seek_index() + oDataStructure.push_seek_index() + if record_constraint.detect(oDataStructure): + oDataStructure.pop_seek_index() + return True + + oDataStructure.pop_seek_index() + return False diff --git a/vsg/vhdlFile/classify/record_constraint.py b/vsg/vhdlFile/classify/record_constraint.py index 40c84e34c..b6b120eb6 100644 --- a/vsg/vhdlFile/classify/record_constraint.py +++ b/vsg/vhdlFile/classify/record_constraint.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import record_constraint as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import record_element_constraint @@ -12,7 +11,7 @@ def detect(oDataStructure): record_constraint ::= ( record_element_constraint { , record_element_constraint } ) """ - oDataStructure.align_seek_index() + if oDataStructure.is_next_seek_token("("): oDataStructure.increment_seek_index() if record_element_constraint.detect(oDataStructure): From d7ec6097d87237f05b8f1a634983faae5dd7ab39 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 10 Apr 2025 06:53:31 -0500 Subject: [PATCH 107/124] Removing align_seek_index --- vsg/vhdlFile/classify/resolution_indication.py | 1 - vsg/vhdlFile/classify/subtype_indication.py | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/vsg/vhdlFile/classify/resolution_indication.py b/vsg/vhdlFile/classify/resolution_indication.py index 9b2a0d651..b61b98bf0 100644 --- a/vsg/vhdlFile/classify/resolution_indication.py +++ b/vsg/vhdlFile/classify/resolution_indication.py @@ -18,7 +18,6 @@ def detect(oDataStructure): elif detect_resolution_function_name(oDataStructure): classify_resolution_function_name(oDataStructure) return True - oDataStructure.align_seek_index() return False diff --git a/vsg/vhdlFile/classify/subtype_indication.py b/vsg/vhdlFile/classify/subtype_indication.py index b1956f615..4039bee68 100644 --- a/vsg/vhdlFile/classify/subtype_indication.py +++ b/vsg/vhdlFile/classify/subtype_indication.py @@ -10,8 +10,14 @@ def classify(oDataStructure): subtype_indication ::= [ resolution_indication ] type_mark [ constraint ] """ + oDataStructure.push_seek_index() resolution_indication.detect(oDataStructure) + oDataStructure.pop_seek_index() + oDataStructure.push_seek_index() type_mark.classify(oDataStructure) + oDataStructure.pop_seek_index() + oDataStructure.push_seek_index() constraint.detect(oDataStructure) + oDataStructure.pop_seek_index() From 2292be8f4a311c667dba1ca65f3983f3171a1942 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 10 Apr 2025 06:55:40 -0500 Subject: [PATCH 108/124] Removing advance_seek_index_to_current_index --- vsg/vhdlFile/classify/resolution_indication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsg/vhdlFile/classify/resolution_indication.py b/vsg/vhdlFile/classify/resolution_indication.py index b61b98bf0..8124c0c22 100644 --- a/vsg/vhdlFile/classify/resolution_indication.py +++ b/vsg/vhdlFile/classify/resolution_indication.py @@ -11,7 +11,7 @@ def detect(oDataStructure): resolution_indication ::= resolution_function_name | ( element_resolution ) """ - oDataStructure.advance_seek_index_to_current_index() + if detect_element_resolution(oDataStructure): classify_element_resolution(oDataStructure) return True From 18bfde6f4bc435d578852a1cf066d940695e260b Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 10 Apr 2025 07:00:56 -0500 Subject: [PATCH 109/124] Removing advance_seek_index_to_current_index --- vsg/vhdlFile/classify/attribute_name.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/vsg/vhdlFile/classify/attribute_name.py b/vsg/vhdlFile/classify/attribute_name.py index ad21f076f..08c92f1fe 100644 --- a/vsg/vhdlFile/classify/attribute_name.py +++ b/vsg/vhdlFile/classify/attribute_name.py @@ -12,16 +12,11 @@ def detect(oDataStructure): prefix [ signature ] ' attribute_designator [ ( expression ) ] """ - # Skip over prefix - oDataStructure.advance_seek_index_to_current_index() - oDataStructure.advance_to_next_seek_token() skip_prefix(oDataStructure) - # Check for signature if signature.detect(oDataStructure): return True - # Check for tic if oDataStructure.is_next_seek_token("'"): return True @@ -30,6 +25,7 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) def skip_prefix(oDataStructure): + oDataStructure.advance_to_next_seek_token() oDataStructure.increment_seek_index() oDataStructure.advance_seek_over_parenthesis() From 2d0e01b860a5cecce38b7b7e3f2aa7e5a87f00b4 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 10 Apr 2025 07:21:08 -0500 Subject: [PATCH 110/124] subprogram_instantiation_declaration classify test pass --- vsg/vhdlFile/classify/subprogram_instantiation_declaration.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py b/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py index 87ac5f230..a7b906f3c 100644 --- a/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py +++ b/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py @@ -31,7 +31,8 @@ def classify(oDataStructure): oDataStructure.replace_next_token_required("new", token.new_keyword) oDataStructure.replace_next_token_with(token.uninstantiated_subprogram_name) - signature.detect(oDataStructure) + if signature.detect(oDataStructure): + signature.classify(oDataStructure) generic_map_aspect.detect(oDataStructure) From cd249217953bc3873bdd14dfdfb48faba146ccd7 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 10 Apr 2025 07:40:35 -0500 Subject: [PATCH 111/124] Fixing column reporting in error messages. --- vsg/data_structure.py | 2 +- vsg/vhdlFile/classify/utils.py | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 4463a5380..637abe342 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -11,7 +11,7 @@ class design_file: def __init__(self, lAllObjects): self.lAllObjects = lAllObjects self.iEndIndex = len(lAllObjects) - 1 - self.sFilename = "" + self.sFilename = None self.iCurrent = 0 self.lCurrent = [] self.iSeek = 0 diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 82cc0cba2..927a1e3cd 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -226,7 +226,7 @@ def print_error_message(sToken, token, currentToken, oDataStructure): iLine = 0 iColumn = 0 iLine = currentToken.iLineNumber - # iColumn = calculate_column(iToken, lObjects) + iColumn = calculate_column(oDataStructure) sModuleName = extract_module_name(token) sFileName = oDataStructure.sFilename @@ -241,6 +241,16 @@ def print_error_message(sToken, token, currentToken, oDataStructure): raise exceptions.ClassifyError(sErrorMessage) +def calculate_column(oDataStructure): + iReturn = 0 + for iIndex in range(oDataStructure.iCurrent - 1, 0, -1): + if isinstance(oDataStructure.lAllObjects[iIndex], parser.carriage_return): + break + iReturn += len(oDataStructure.lAllObjects[iIndex].get_value()) + iReturn += 1 + return iReturn + + def extract_module_name(token): return token.__module__.split(".")[-1] From 40ca1e71757223538d75b45b102d1b7df6203b2e Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 10 Apr 2025 07:46:04 -0500 Subject: [PATCH 112/124] Fixing filename reporting. --- vsg/data_structure.py | 3 +++ vsg/vhdlFile/vhdlFile.py | 1 + 2 files changed, 4 insertions(+) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 637abe342..8f38f9cce 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -263,3 +263,6 @@ def pop_current_index(self): def set_mark_index(self): self.iMark = self.iSeek + + def set_filename(self, sString): + self.sFilename = sString diff --git a/vsg/vhdlFile/vhdlFile.py b/vsg/vhdlFile/vhdlFile.py index 047a8302f..e03ec5ef2 100644 --- a/vsg/vhdlFile/vhdlFile.py +++ b/vsg/vhdlFile/vhdlFile.py @@ -154,6 +154,7 @@ def _processFile(self): try: oDataStructure = data_structure.New(self.lAllObjects) + oDataStructure.set_filename(self.filename) design_file.tokenize(oDataStructure) except exceptions.ClassifyError as e: if self.commandLineArguments.force_fix and self.commandLineArguments.fix: From 05037a902e1968bedef4ff410466b9162ad0f4ed Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 10 Apr 2025 07:56:31 -0500 Subject: [PATCH 113/124] Addressing out of index issues. --- vsg/data_structure.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 8f38f9cce..c108af735 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -130,7 +130,10 @@ def get_current_token(self): return self.lAllObjects[self.iCurrent] def get_current_token_lower_value(self): - return self.lAllObjects[self.iCurrent].lower_value + try: + return self.lAllObjects[self.iCurrent].lower_value + except IndexError: + return "" def get_current_token_value(self): return self.lAllObjects[self.iCurrent].get_value() @@ -142,7 +145,10 @@ def get_seek_index(self): return self.iSeek def get_seek_token_lower_value(self): - return self.lAllObjects[self.iSeek].lower_value + try: + return self.lAllObjects[self.iSeek].lower_value + except IndexError: + return "" def increment_current_index(self): self.iCurrent += 1 From 99ac22b5750578e12173af45c8c604b651cd56b6 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 10 Apr 2025 21:19:50 -0500 Subject: [PATCH 114/124] Updating if_next_token_is to if_next_seek_token_is --- vsg/data_structure.py | 4 +++- vsg/vhdlFile/classify/choice.py | 16 ---------------- vsg/vhdlFile/classify/element_declaration.py | 12 ++++++++++-- vsg/vhdlFile/classify/force_mode.py | 9 ++++++++- vsg/vhdlFile/classify/generate_statement_body.py | 1 - vsg/vhdlFile/classify/range.py | 2 +- vsg/vhdlFile/classify/signature.py | 6 +++--- vsg/vhdlFile/classify/variable_declaration.py | 4 ++-- vsg/vhdlFile/classify/waveform.py | 4 ++-- vsg/vhdlFile/classify/waveform_element.py | 4 ++-- 10 files changed, 31 insertions(+), 31 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index c108af735..677b40b8a 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -25,7 +25,7 @@ def advance_to_next_token(self): for iIndex, oToken in enumerate(self.lAllObjects[self.iCurrent : :]): if type(oToken) == parser.item: self.iCurrent = self.iCurrent + iIndex -# self.align_seek_index() +# self.iSeek = self.iCurrent return True return False @@ -152,6 +152,7 @@ def get_seek_token_lower_value(self): def increment_current_index(self): self.iCurrent += 1 +# self.iSeek = self.iCurrent def increment_seek_index(self): # TODO: find a way to calculate the length of lAllObjects less frequent @@ -266,6 +267,7 @@ def push_current_index(self): def pop_current_index(self): self.iCurrent = self.lCurrent.pop() + self.iSeek = self.iCurrent def set_mark_index(self): self.iMark = self.iSeek diff --git a/vsg/vhdlFile/classify/choice.py b/vsg/vhdlFile/classify/choice.py index dacd2ddb6..64b345b5d 100644 --- a/vsg/vhdlFile/classify/choice.py +++ b/vsg/vhdlFile/classify/choice.py @@ -2,7 +2,6 @@ from vsg import decorators, parser from vsg.token import choice as token -from vsg.vhdlFile import utils @decorators.print_classifier_debug_info(__name__) @@ -19,18 +18,3 @@ def classify_until(lUntils, oDataStructure): else: while not oDataStructure.is_next_token_one_of(lUntils): oDataStructure.replace_next_token_with(parser.todo) - - -# TODO: Need to watch out for parenthesis in lUntils -# iParen = 0 -# for iIndex in range(iToken, len(lObjects)): -# iParen = utils.update_paren_counter(iIndex, lObjects, iParen) -# if utils.is_next_token_in_list(lUntils, iIndex, lObjects) and iParen == 0: -# return iIndex -# if utils.is_item(lObjects, iIndex): -# if utils.is_next_token("others", iIndex, lObjects): -# utils.assign_next_token_required("others", token.others_keyword, iIndex, lObjects) -# else: -# utils.assign_next_token(parser.todo, iIndex, lObjects) -# -# return iToken diff --git a/vsg/vhdlFile/classify/element_declaration.py b/vsg/vhdlFile/classify/element_declaration.py index d38099238..b66a19d67 100644 --- a/vsg/vhdlFile/classify/element_declaration.py +++ b/vsg/vhdlFile/classify/element_declaration.py @@ -6,13 +6,21 @@ from vsg.vhdlFile.classify import element_subtype_definition, identifier_list -@decorators.print_classifier_debug_info(__name__) -def classify(oDataStructure): +def detect(oDataStructure): """ element_declaration ::= identifier_list : element_subtype_definition ; """ + if oDataStructure.does_string_exist_before_string(":", ";"): + classify(oDataStructure) + return True + return False + + +@decorators.print_classifier_debug_info(__name__) +def classify(oDataStructure): + identifier_list.classify_until([":"], oDataStructure) oDataStructure.replace_next_token_required(":", token.colon) diff --git a/vsg/vhdlFile/classify/force_mode.py b/vsg/vhdlFile/classify/force_mode.py index 590512db6..f96660c8b 100644 --- a/vsg/vhdlFile/classify/force_mode.py +++ b/vsg/vhdlFile/classify/force_mode.py @@ -4,7 +4,6 @@ from vsg.token import force_mode as token -# TODO: Split detect into detect and classify @decorators.print_classifier_debug_info(__name__) def detect(oDataStructure): """ @@ -12,5 +11,13 @@ def detect(oDataStructure): in | out """ + if oDataStructure.is_next_token_one_of(["in", "out"]): + classify(oDataStructure) + return True + return False + + +def classify(oDataStructure): + oDataStructure.replace_next_token_with_if("in", token.in_keyword) oDataStructure.replace_next_token_with_if("out", token.out_keyword) diff --git a/vsg/vhdlFile/classify/generate_statement_body.py b/vsg/vhdlFile/classify/generate_statement_body.py index b1f92cd96..5040ebe1e 100644 --- a/vsg/vhdlFile/classify/generate_statement_body.py +++ b/vsg/vhdlFile/classify/generate_statement_body.py @@ -19,7 +19,6 @@ def classify(oDataStructure): oDataStructure.replace_next_token_with_if("begin", token.begin_keyword) - # TODO: push while loop into concurrent_statement.detect while not oDataStructure.is_next_token_one_of(["elsif", "else", "when", "end"]): if not concurrent_statement.detect(oDataStructure): break diff --git a/vsg/vhdlFile/classify/range.py b/vsg/vhdlFile/classify/range.py index 9204c9b56..837861c48 100644 --- a/vsg/vhdlFile/classify/range.py +++ b/vsg/vhdlFile/classify/range.py @@ -14,7 +14,7 @@ def detect(oDataStructure): oDataStructure.push_seek_index() if oDataStructure.are_next_consecutive_tokens(["(", None, ")"]): return True - # TODO: move mySeek into oDataStructure + oDataStructure.pop_seek_index() oDataStructure.push_seek_index() if attribute_name.detect(oDataStructure): diff --git a/vsg/vhdlFile/classify/signature.py b/vsg/vhdlFile/classify/signature.py index 32e21d04c..eed199003 100644 --- a/vsg/vhdlFile/classify/signature.py +++ b/vsg/vhdlFile/classify/signature.py @@ -30,15 +30,15 @@ def classify(oDataStructure): @decorators.print_classifier_debug_info(__name__) def detect_return(oDataStructure): - if oDataStructure.is_next_token("return"): + if oDataStructure.is_next_seek_token("return"): oDataStructure.replace_next_token_with(token.return_keyword) type_mark.classify(oDataStructure) @decorators.print_classifier_debug_info(__name__) def detect_type_mark(oDataStructure): - if not oDataStructure.is_next_token("return"): + if not oDataStructure.is_next_seek_token("return"): type_mark.classify(oDataStructure) - while oDataStructure.is_next_token(","): + while oDataStructure.is_next_seek_token(","): oDataStructure.replace_next_token_required(",", token.comma) type_mark.classify(oDataStructure) diff --git a/vsg/vhdlFile/classify/variable_declaration.py b/vsg/vhdlFile/classify/variable_declaration.py index f3f0a182e..706fcb531 100644 --- a/vsg/vhdlFile/classify/variable_declaration.py +++ b/vsg/vhdlFile/classify/variable_declaration.py @@ -13,7 +13,7 @@ def detect(oDataStructure): [ shared ] variable identifier_list : subtype_indication [ := expression ] ; """ - if oDataStructure.is_next_token_one_of(["shared", "variable"]): + if oDataStructure.is_next_seek_token_one_of(["shared", "variable"]): classify(oDataStructure) return True return False @@ -30,7 +30,7 @@ def classify(oDataStructure): subtype_indication.classify(oDataStructure) - if oDataStructure.is_next_token(":="): + if oDataStructure.is_next_seek_token(":="): oDataStructure.replace_next_token_with(token.assignment_operator) expression.classify_until([";"], oDataStructure) diff --git a/vsg/vhdlFile/classify/waveform.py b/vsg/vhdlFile/classify/waveform.py index 590e9f941..227bb6040 100644 --- a/vsg/vhdlFile/classify/waveform.py +++ b/vsg/vhdlFile/classify/waveform.py @@ -13,7 +13,7 @@ def classify_until(lUntils, oDataStructure): | unaffected """ - if oDataStructure.is_next_token("unaffected"): + if oDataStructure.is_next_seek_token("unaffected"): oDataStructure.replace_next_token_with(token.unaffected_keyword) else: lMyUntils = lUntils @@ -21,7 +21,7 @@ def classify_until(lUntils, oDataStructure): waveform_element.classify_until(lMyUntils, oDataStructure) - while oDataStructure.is_next_token(","): + while oDataStructure.is_next_seek_token(","): oDataStructure.replace_next_token_with(token.comma) waveform_element.classify_until(lMyUntils, oDataStructure) diff --git a/vsg/vhdlFile/classify/waveform_element.py b/vsg/vhdlFile/classify/waveform_element.py index 9bf49929e..6131b6de0 100644 --- a/vsg/vhdlFile/classify/waveform_element.py +++ b/vsg/vhdlFile/classify/waveform_element.py @@ -13,13 +13,13 @@ def classify_until(lUntils, oDataStructure): | null [ after *time*_expression ] """ - if oDataStructure.is_next_token("null"): + if oDataStructure.is_next_seek_token("null"): oDataStructure.replace_next_token_with(token.null_keyword) else: lMyUntils = lUntils lMyUntils.append("after") expression.classify_until(lMyUntils, oDataStructure) - if oDataStructure.is_next_token("after"): + if oDataStructure.is_next_seek_token("after"): oDataStructure.replace_next_token_with(token.after_keyword) expression.classify_until(lUntils, oDataStructure) From 0efed0c8cda23226b5572c8cefd1f030fd2886ac Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Thu, 10 Apr 2025 21:37:23 -0500 Subject: [PATCH 115/124] Replacing is_next_token with is_next_seek_token --- vsg/vhdlFile/classify/subtype_declaration.py | 2 +- vsg/vhdlFile/classify/target.py | 2 +- vsg/vhdlFile/classify/timeout_clause.py | 2 +- vsg/vhdlFile/classify/unbounded_array_definition.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vsg/vhdlFile/classify/subtype_declaration.py b/vsg/vhdlFile/classify/subtype_declaration.py index f13dedcdb..c9931c669 100644 --- a/vsg/vhdlFile/classify/subtype_declaration.py +++ b/vsg/vhdlFile/classify/subtype_declaration.py @@ -12,7 +12,7 @@ def detect(oDataStructure): subtype identifier is subtype_indication ; """ - if oDataStructure.is_next_token("subtype"): + if oDataStructure.is_next_seek_token("subtype"): classify(oDataStructure) return True return False diff --git a/vsg/vhdlFile/classify/target.py b/vsg/vhdlFile/classify/target.py index ae777a101..7dd555e5f 100644 --- a/vsg/vhdlFile/classify/target.py +++ b/vsg/vhdlFile/classify/target.py @@ -11,7 +11,7 @@ def classify(oDataStructure, oTokenClass): name | aggregate """ - if oDataStructure.is_next_token("("): + if oDataStructure.is_next_seek_token("("): aggregate.classify(oDataStructure, oTokenClass) else: utils.assign_tokens_until(":=", oTokenClass.simple_name, oDataStructure) diff --git a/vsg/vhdlFile/classify/timeout_clause.py b/vsg/vhdlFile/classify/timeout_clause.py index 667a354bb..94645c42e 100644 --- a/vsg/vhdlFile/classify/timeout_clause.py +++ b/vsg/vhdlFile/classify/timeout_clause.py @@ -12,7 +12,7 @@ def detect(oDataStructure): for *time*_expression """ - if oDataStructure.is_next_token("for"): + if oDataStructure.is_next_seek_token("for"): return True return False diff --git a/vsg/vhdlFile/classify/unbounded_array_definition.py b/vsg/vhdlFile/classify/unbounded_array_definition.py index 997b2c540..1fa573f36 100644 --- a/vsg/vhdlFile/classify/unbounded_array_definition.py +++ b/vsg/vhdlFile/classify/unbounded_array_definition.py @@ -13,7 +13,7 @@ def detect(oDataStructure): of *element*_subtype_indication """ - if oDataStructure.is_next_token("array"): + if oDataStructure.is_next_seek_token("array"): if oDataStructure.does_string_exist_in_next_n_tokens("<>", 5): classify(oDataStructure) return True @@ -26,7 +26,7 @@ def classify(oDataStructure): oDataStructure.replace_next_token_required("(", token.open_parenthesis) index_subtype_definition.classify(oDataStructure) - while oDataStructure.is_next_token(","): + while oDataStructure.is_next_seek_token(","): oDataStructure.replace_next_token_with(token.comma) index_subtype_definition.classify(oDataStructure) From fefd151dae55c914ac18b7659a4664f92fb70465 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Fri, 11 Apr 2025 06:33:11 -0500 Subject: [PATCH 116/124] Removing vhdlFile utils --- .../classify/access_type_definition.py | 1 - vsg/vhdlFile/classify/alias_declaration.py | 1 - .../classify/architecture_declarative_part.py | 1 - vsg/vhdlFile/classify/block_specification.py | 1 - .../classify/conditional_signal_assignment.py | 1 - .../classify/conditional_waveforms.py | 1 - .../classify/constrained_array_definition.py | 1 - vsg/vhdlFile/classify/delay_mechanism.py | 1 - vsg/vhdlFile/classify/discrete_range.py | 11 ---------- vsg/vhdlFile/classify/element_declaration.py | 1 - vsg/vhdlFile/classify/element_resolution.py | 20 +++++++++---------- .../classify/entity_statement_part.py | 1 - .../classify/interface_file_declaration.py | 1 - .../interface_function_specification.py | 1 - .../interface_incomplete_type_declaration.py | 1 - .../interface_procedure_specification.py | 1 - .../classify/interface_unknown_declaration.py | 1 - vsg/vhdlFile/classify/iteration_scheme.py | 1 - vsg/vhdlFile/classify/mode.py | 1 - vsg/vhdlFile/classify/package_body.py | 1 - .../classify/parameter_specification.py | 1 - .../classify/protected_type_declaration.py | 1 - .../classify/record_element_constraint.py | 1 - .../classify/resolution_indication.py | 9 ++++++--- vsg/vhdlFile/classify/sensitivity_clause.py | 1 - vsg/vhdlFile/classify/sequential_statement.py | 2 -- vsg/vhdlFile/classify/signature.py | 1 - .../simple_configuration_specification.py | 1 - vsg/vhdlFile/classify/subprogram_header.py | 1 - .../subprogram_instantiation_declaration.py | 1 - vsg/vhdlFile/classify/utils.py | 1 - vsg/vhdlFile/classify/variable_declaration.py | 1 - 32 files changed, 16 insertions(+), 54 deletions(-) diff --git a/vsg/vhdlFile/classify/access_type_definition.py b/vsg/vhdlFile/classify/access_type_definition.py index 8bedc5d00..447294da6 100644 --- a/vsg/vhdlFile/classify/access_type_definition.py +++ b/vsg/vhdlFile/classify/access_type_definition.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import access_type_definition as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import subtype_indication diff --git a/vsg/vhdlFile/classify/alias_declaration.py b/vsg/vhdlFile/classify/alias_declaration.py index 646158494..cada293b3 100644 --- a/vsg/vhdlFile/classify/alias_declaration.py +++ b/vsg/vhdlFile/classify/alias_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import alias_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import name, signature, subtype_indication diff --git a/vsg/vhdlFile/classify/architecture_declarative_part.py b/vsg/vhdlFile/classify/architecture_declarative_part.py index 86a169f0f..c64df7f09 100644 --- a/vsg/vhdlFile/classify/architecture_declarative_part.py +++ b/vsg/vhdlFile/classify/architecture_declarative_part.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg import decorators -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import block_declarative_item diff --git a/vsg/vhdlFile/classify/block_specification.py b/vsg/vhdlFile/classify/block_specification.py index e5e1b2380..09d9fde39 100644 --- a/vsg/vhdlFile/classify/block_specification.py +++ b/vsg/vhdlFile/classify/block_specification.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import block_specification as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generate_specification diff --git a/vsg/vhdlFile/classify/conditional_signal_assignment.py b/vsg/vhdlFile/classify/conditional_signal_assignment.py index f96dd758f..5777c1232 100644 --- a/vsg/vhdlFile/classify/conditional_signal_assignment.py +++ b/vsg/vhdlFile/classify/conditional_signal_assignment.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg import decorators -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import ( conditional_force_assignment, conditional_waveform_assignment, diff --git a/vsg/vhdlFile/classify/conditional_waveforms.py b/vsg/vhdlFile/classify/conditional_waveforms.py index 4841c3843..a69216af4 100644 --- a/vsg/vhdlFile/classify/conditional_waveforms.py +++ b/vsg/vhdlFile/classify/conditional_waveforms.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import conditional_waveforms as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import condition, waveform diff --git a/vsg/vhdlFile/classify/constrained_array_definition.py b/vsg/vhdlFile/classify/constrained_array_definition.py index f6d5e2ed5..f545fa707 100644 --- a/vsg/vhdlFile/classify/constrained_array_definition.py +++ b/vsg/vhdlFile/classify/constrained_array_definition.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import constrained_array_definition as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import index_constraint, subtype_indication diff --git a/vsg/vhdlFile/classify/delay_mechanism.py b/vsg/vhdlFile/classify/delay_mechanism.py index ac7aacb34..97bee5e78 100644 --- a/vsg/vhdlFile/classify/delay_mechanism.py +++ b/vsg/vhdlFile/classify/delay_mechanism.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import delay_mechanism as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression diff --git a/vsg/vhdlFile/classify/discrete_range.py b/vsg/vhdlFile/classify/discrete_range.py index b4c8b4d96..0e7a8d28c 100644 --- a/vsg/vhdlFile/classify/discrete_range.py +++ b/vsg/vhdlFile/classify/discrete_range.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg import decorators, parser -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import range, subtype_indication @@ -27,16 +26,6 @@ def detect(oDataStructure): return range.detect(oDataStructure) -@decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - """ - discrete_range ::= - *discrete*_subtype_indication | range - """ - - return utils.assign_token(lObjects, iToken, parser.todo) - - @decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, oDataStructure): iOpenParenthesis = 0 diff --git a/vsg/vhdlFile/classify/element_declaration.py b/vsg/vhdlFile/classify/element_declaration.py index b66a19d67..becfd855e 100644 --- a/vsg/vhdlFile/classify/element_declaration.py +++ b/vsg/vhdlFile/classify/element_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import element_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import element_subtype_definition, identifier_list diff --git a/vsg/vhdlFile/classify/element_resolution.py b/vsg/vhdlFile/classify/element_resolution.py index 77b3a91ab..48f3ad55a 100644 --- a/vsg/vhdlFile/classify/element_resolution.py +++ b/vsg/vhdlFile/classify/element_resolution.py @@ -1,15 +1,15 @@ # -*- coding: utf-8 -*- -from vsg import decorators -from vsg.vhdlFile import utils +from vsg import decorators, parser +from vsg.vhdlFile.classify import utils @decorators.print_classifier_debug_info(__name__) -def classify_until(lUntils, iToken, lObjects): - iCurrent = iToken - iLast = 0 - while iLast != iCurrent: - iLast = iCurrent - if lObjects[utils.find_next_token(iCurrent, lObjects)].get_lower_value() in lUntils: - return iCurrent - iCurrent = utils.assign_next_token(parser.todo, iCurrent, lObjects) +def classify(oDataStructure): + """ + element_resolution ::= + array_constraint + | record_constraint + """ + + utils.assign_tokens_until_matching_closing_paren(parser.todo, oDataStructure) diff --git a/vsg/vhdlFile/classify/entity_statement_part.py b/vsg/vhdlFile/classify/entity_statement_part.py index 8d5bafb82..79c482f40 100644 --- a/vsg/vhdlFile/classify/entity_statement_part.py +++ b/vsg/vhdlFile/classify/entity_statement_part.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from vsg import decorators -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import entity_statement diff --git a/vsg/vhdlFile/classify/interface_file_declaration.py b/vsg/vhdlFile/classify/interface_file_declaration.py index 841a68c32..05bb17db4 100644 --- a/vsg/vhdlFile/classify/interface_file_declaration.py +++ b/vsg/vhdlFile/classify/interface_file_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import interface_file_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier_list, subtype_indication diff --git a/vsg/vhdlFile/classify/interface_function_specification.py b/vsg/vhdlFile/classify/interface_function_specification.py index c195143a8..5123f2a48 100644 --- a/vsg/vhdlFile/classify/interface_function_specification.py +++ b/vsg/vhdlFile/classify/interface_function_specification.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import interface_function_specification as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import formal_parameter_list, type_mark diff --git a/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py b/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py index 624799974..87dc33717 100644 --- a/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py +++ b/vsg/vhdlFile/classify/interface_incomplete_type_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import interface_incomplete_type_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import identifier diff --git a/vsg/vhdlFile/classify/interface_procedure_specification.py b/vsg/vhdlFile/classify/interface_procedure_specification.py index b0eac8a9a..d4cba53a3 100644 --- a/vsg/vhdlFile/classify/interface_procedure_specification.py +++ b/vsg/vhdlFile/classify/interface_procedure_specification.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import interface_procedure_specification as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import formal_parameter_list diff --git a/vsg/vhdlFile/classify/interface_unknown_declaration.py b/vsg/vhdlFile/classify/interface_unknown_declaration.py index ec884a4ee..5617d7130 100644 --- a/vsg/vhdlFile/classify/interface_unknown_declaration.py +++ b/vsg/vhdlFile/classify/interface_unknown_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import interface_unknown_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, mode, subtype_indication diff --git a/vsg/vhdlFile/classify/iteration_scheme.py b/vsg/vhdlFile/classify/iteration_scheme.py index 6915e3660..ed9288b0d 100644 --- a/vsg/vhdlFile/classify/iteration_scheme.py +++ b/vsg/vhdlFile/classify/iteration_scheme.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import iteration_scheme as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import condition, parameter_specification diff --git a/vsg/vhdlFile/classify/mode.py b/vsg/vhdlFile/classify/mode.py index e02f869b5..d2acecfa4 100644 --- a/vsg/vhdlFile/classify/mode.py +++ b/vsg/vhdlFile/classify/mode.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import mode as token -from vsg.vhdlFile import utils @decorators.print_classifier_debug_info(__name__) diff --git a/vsg/vhdlFile/classify/package_body.py b/vsg/vhdlFile/classify/package_body.py index 54c9923aa..1059fecd8 100644 --- a/vsg/vhdlFile/classify/package_body.py +++ b/vsg/vhdlFile/classify/package_body.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import package_body as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import package_body_declarative_part diff --git a/vsg/vhdlFile/classify/parameter_specification.py b/vsg/vhdlFile/classify/parameter_specification.py index 723b73506..bc2fac12e 100644 --- a/vsg/vhdlFile/classify/parameter_specification.py +++ b/vsg/vhdlFile/classify/parameter_specification.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import parameter_specification as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import discrete_range diff --git a/vsg/vhdlFile/classify/protected_type_declaration.py b/vsg/vhdlFile/classify/protected_type_declaration.py index 958a16603..f7a10e8fc 100644 --- a/vsg/vhdlFile/classify/protected_type_declaration.py +++ b/vsg/vhdlFile/classify/protected_type_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import protected_type_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import protected_type_declarative_part diff --git a/vsg/vhdlFile/classify/record_element_constraint.py b/vsg/vhdlFile/classify/record_element_constraint.py index 7f7089a80..34a4ff561 100644 --- a/vsg/vhdlFile/classify/record_element_constraint.py +++ b/vsg/vhdlFile/classify/record_element_constraint.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import record_element_constraint as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import element_constraint diff --git a/vsg/vhdlFile/classify/resolution_indication.py b/vsg/vhdlFile/classify/resolution_indication.py index 8124c0c22..ab72c1442 100644 --- a/vsg/vhdlFile/classify/resolution_indication.py +++ b/vsg/vhdlFile/classify/resolution_indication.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- -from vsg import decorators, parser +from vsg import decorators from vsg.token import resolution_indication as token -from vsg.vhdlFile.classify import utils +from vsg.vhdlFile.classify import element_resolution, utils @decorators.print_classifier_debug_info(__name__) @@ -24,7 +24,10 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) def classify_element_resolution(oDataStructure): oDataStructure.replace_next_token_required("(", token.open_parenthesis) - utils.assign_tokens_until_matching_closing_paren(parser.todo, oDataStructure) + + element_resolution.classify(oDataStructure) +# utils.assign_tokens_until_matching_closing_paren(parser.todo, oDataStructure) + oDataStructure.replace_next_token_required(")", token.close_parenthesis) diff --git a/vsg/vhdlFile/classify/sensitivity_clause.py b/vsg/vhdlFile/classify/sensitivity_clause.py index c2d879631..117d5f027 100644 --- a/vsg/vhdlFile/classify/sensitivity_clause.py +++ b/vsg/vhdlFile/classify/sensitivity_clause.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import sensitivity_clause as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import sensitivity_list diff --git a/vsg/vhdlFile/classify/sequential_statement.py b/vsg/vhdlFile/classify/sequential_statement.py index 0270f4cb8..cc90f0448 100644 --- a/vsg/vhdlFile/classify/sequential_statement.py +++ b/vsg/vhdlFile/classify/sequential_statement.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- -# from vsg.vhdlFile import utils - from vsg import decorators from vsg.vhdlFile.classify import ( assertion_statement, diff --git a/vsg/vhdlFile/classify/signature.py b/vsg/vhdlFile/classify/signature.py index eed199003..c9b70209a 100644 --- a/vsg/vhdlFile/classify/signature.py +++ b/vsg/vhdlFile/classify/signature.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import signature as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import type_mark diff --git a/vsg/vhdlFile/classify/simple_configuration_specification.py b/vsg/vhdlFile/classify/simple_configuration_specification.py index 280b854fa..6ea810e62 100644 --- a/vsg/vhdlFile/classify/simple_configuration_specification.py +++ b/vsg/vhdlFile/classify/simple_configuration_specification.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import simple_configuration_specification as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import binding_indication, component_specification diff --git a/vsg/vhdlFile/classify/subprogram_header.py b/vsg/vhdlFile/classify/subprogram_header.py index c54d4928f..94059a38b 100644 --- a/vsg/vhdlFile/classify/subprogram_header.py +++ b/vsg/vhdlFile/classify/subprogram_header.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import subprogram_header as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_list, generic_map_aspect diff --git a/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py b/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py index a7b906f3c..cae0931f2 100644 --- a/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py +++ b/vsg/vhdlFile/classify/subprogram_instantiation_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import subprogram_instantiation_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import generic_map_aspect, signature, subprogram_kind diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 927a1e3cd..7d86ad354 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -8,7 +8,6 @@ exponent, relational_operator, ) -from vsg.vhdlFile import utils def classify_selected_name(oDataStructure, token): diff --git a/vsg/vhdlFile/classify/variable_declaration.py b/vsg/vhdlFile/classify/variable_declaration.py index 706fcb531..f164fa3f0 100644 --- a/vsg/vhdlFile/classify/variable_declaration.py +++ b/vsg/vhdlFile/classify/variable_declaration.py @@ -2,7 +2,6 @@ from vsg import decorators from vsg.token import variable_declaration as token -from vsg.vhdlFile import utils from vsg.vhdlFile.classify import expression, identifier_list, subtype_indication From b85e6b865f44a34569a7f5815e7c9fc6ffe311db Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Fri, 11 Apr 2025 06:40:54 -0500 Subject: [PATCH 117/124] Removing references to iCurrent and iToken --- vsg/vhdlFile/classify/expression.py | 10 -------- .../classify/interface_object_declaration.py | 25 ------------------- vsg/vhdlFile/classify/utils.py | 11 -------- 3 files changed, 46 deletions(-) diff --git a/vsg/vhdlFile/classify/expression.py b/vsg/vhdlFile/classify/expression.py index e632e9533..52ed4d142 100644 --- a/vsg/vhdlFile/classify/expression.py +++ b/vsg/vhdlFile/classify/expression.py @@ -9,16 +9,6 @@ ) -@decorators.print_classifier_debug_info(__name__) -def classify(iToken, lObjects): - """ - expression ::= - condition_operator primary - | logical_expression - """ - return utils.assign_token(lObjects, iToken, parser.todo) - - @decorators.print_classifier_debug_info(__name__) def classify_until(lUntils, oDataStructure, oType=parser.todo): """ diff --git a/vsg/vhdlFile/classify/interface_object_declaration.py b/vsg/vhdlFile/classify/interface_object_declaration.py index a9242f55c..efbf6e316 100644 --- a/vsg/vhdlFile/classify/interface_object_declaration.py +++ b/vsg/vhdlFile/classify/interface_object_declaration.py @@ -36,28 +36,3 @@ def detect(oDataStructure): return interface_unknown_declaration.classify(oDataStructure) return False - - -# iReturn = interface_constant_declaration.detect(iCurrent, lObjects) -# if iReturn != iCurrent: -# return iReturn -# -# iReturn = interface_signal_declaration.detect(iCurrent, lObjects) -# if iReturn != iCurrent: -# return iReturn -# -# iReturn = interface_variable_declaration.detect(iCurrent, lObjects) -# if iReturn != iCurrent: -# return iReturn -# -# iReturn = interface_file_declaration.detect(iCurrent, lObjects) -# if iReturn != iCurrent: -# return iReturn -# -# ### This captures constant, signal and variable declarations without optional keywords -# ### This is typically done in port lists -# iReturn = interface_unknown_declaration.detect(iCurrent, lObjects) -# if iReturn != iCurrent: -# return iReturn -# -# return iCurrent diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 7d86ad354..5b125d86c 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -84,17 +84,6 @@ def is_use_clause_selected_name(token): return False -def classify_production(production, iToken, lObjects): - iCurrent = iToken - iStop = len(lObjects) - while iCurrent < iStop: - iPrevious = iCurrent - iCurrent = production.detect(iCurrent, lObjects) - if iPrevious == iCurrent: - break - return iCurrent - - def assign_special_tokens(oDataStructure, oType): sValue = oDataStructure.get_current_token_lower_value() if sValue == ")": From 60a3f62db47845fda0e3c42d568e5687d3325b05 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Fri, 11 Apr 2025 07:05:24 -0500 Subject: [PATCH 118/124] Enhanced element_resolution classifying. --- vsg/vhdlFile/classify/array_constraint.py | 4 ++++ vsg/vhdlFile/classify/element_resolution.py | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/vsg/vhdlFile/classify/array_constraint.py b/vsg/vhdlFile/classify/array_constraint.py index 008779e94..2003f9371 100644 --- a/vsg/vhdlFile/classify/array_constraint.py +++ b/vsg/vhdlFile/classify/array_constraint.py @@ -17,12 +17,16 @@ def detect(oDataStructure): if open_detected(oDataStructure): classify_open(oDataStructure) array_element_constraint.detect(oDataStructure) + oDataStructure.pop_seek_index() return True oDataStructure.pop_seek_index() + oDataStructure.push_seek_index() if index_constraint.detect(oDataStructure): index_constraint.classify(oDataStructure) array_element_constraint.detect(oDataStructure) + oDataStructure.pop_seek_index() return True + oDataStructure.pop_seek_index() return False diff --git a/vsg/vhdlFile/classify/element_resolution.py b/vsg/vhdlFile/classify/element_resolution.py index 48f3ad55a..4602a2da6 100644 --- a/vsg/vhdlFile/classify/element_resolution.py +++ b/vsg/vhdlFile/classify/element_resolution.py @@ -8,8 +8,10 @@ def classify(oDataStructure): """ element_resolution ::= - array_constraint - | record_constraint + array_element_resolution + | record_resolution + + TODO: Add classifiers for array_elemment_resolution and record_resolution """ utils.assign_tokens_until_matching_closing_paren(parser.todo, oDataStructure) From 5816c169208af6509e35fc85f340d87947e34c64 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Fri, 11 Apr 2025 07:12:59 -0500 Subject: [PATCH 119/124] Alphabetized data_structure methods --- vsg/data_structure.py | 106 +++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 677b40b8a..abc8b681f 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -21,6 +21,21 @@ def advance_seek_index_to_current_index(self): if self.iSeek < self.iCurrent: self.iSeek = self.iCurrent + def advance_seek_over_parenthesis(self): + if not self.seek_token_lower_value_is("("): + return False + + iParen = 0 + for iToken, oToken in enumerate(self.lAllObjects[self.iSeek : :]): + if oToken.lower_value == "(": + iParen += 1 + elif oToken.lower_value == ")": + iParen -= 1 + if iParen == 0: + self.iSeek += iToken + 1 + return True + return False + def advance_to_next_token(self): for iIndex, oToken in enumerate(self.lAllObjects[self.iCurrent : :]): if type(oToken) == parser.item: @@ -62,6 +77,18 @@ def at_end_of_file(self): def current_token_lower_value_is(self, sString): return self.get_current_token_lower_value() == sString + def debug_print(self, iNumTokens): + sOutput = "" + for oToken in self.lAllObjects[self.iCurrent : self.iCurrent + iNumTokens]: + sOutput += oToken.get_value() + print(f">>Current[{sOutput}]<<") + + def debug_seek_print(self, iNumTokens): + sOutput = "" + for oToken in self.lAllObjects[self.iSeek : self.iSeek + iNumTokens]: + sOutput += oToken.get_value() + print(f">>Seek[{sOutput}]<<") + def does_seek_token_match_regex(self, oRegex): if oRegex.fullmatch(self.get_seek_token_lower_value()) is not None: return True @@ -74,6 +101,17 @@ def does_string_exist_before_string(self, sFirst, sSecond): if oToken.lower_value == sFirst: return True + def does_string_exist_before_mark_index_honoring_parenthesis_hierarchy(self, sString): + iParen = 0 + for iIndex in range(self.get_current_index(), self.iMark): + if self.lAllObjects[iIndex].lower_value == "(": + iParen += 1 + elif self.lAllObjects[iIndex].lower_value == ")": + iParen -= 1 + if iParen == 0 and self.lAllObjects[iIndex].lower_value == sString: + return True + return False + def does_string_exist_before_matching_close_parenthesis(self, sString, myParen=0): iParen = myParen for oToken in self.lAllObjects[self.iSeek : :]: @@ -100,17 +138,6 @@ def does_string_exist_before_string_honoring_parenthesis_hierarchy(self, sFirst, return True return False - def does_string_exist_before_mark_index_honoring_parenthesis_hierarchy(self, sString): - iParen = 0 - for iIndex in range(self.get_current_index(), self.iMark): - if self.lAllObjects[iIndex].lower_value == "(": - iParen += 1 - elif self.lAllObjects[iIndex].lower_value == ")": - iParen -= 1 - if iParen == 0 and self.lAllObjects[iIndex].lower_value == sString: - return True - return False - def does_string_exist_in_next_n_tokens(self, sString, iNumTokens): self.iSeek = self.iCurrent return self.does_string_exist_in_next_n_tokens_from_seek_index(sString, iNumTokens) @@ -179,6 +206,19 @@ def is_next_token_one_of(self, lString): self.advance_to_next_token() return self.get_current_token_lower_value() in lString + def push_current_index(self): + self.lCurrent.append(self.iCurrent) + + def push_seek_index(self): + self.lSeek.append(self.iSeek) + + def pop_current_index(self): + self.iCurrent = self.lCurrent.pop() + self.iSeek = self.iCurrent + + def pop_seek_index(self): + self.iSeek = self.lSeek.pop() + def remove_token_at_offset(self, iOffset): self.lAllObjects.pop(self.iCurrent + iOffset) @@ -229,48 +269,8 @@ def seek_to_next_token(self): def seek_token_lower_value_is(self, sString): return self.get_seek_token_lower_value() == sString - def advance_seek_over_parenthesis(self): - if not self.seek_token_lower_value_is("("): - return False - - iParen = 0 - for iToken, oToken in enumerate(self.lAllObjects[self.iSeek : :]): - if oToken.lower_value == "(": - iParen += 1 - elif oToken.lower_value == ")": - iParen -= 1 - if iParen == 0: - self.iSeek += iToken + 1 - return True - return False - - def debug_print(self, iNumTokens): - sOutput = "" - for oToken in self.lAllObjects[self.iCurrent : self.iCurrent + iNumTokens]: - sOutput += oToken.get_value() - print(f">>Current[{sOutput}]<<") - - def debug_seek_print(self, iNumTokens): - sOutput = "" - for oToken in self.lAllObjects[self.iSeek : self.iSeek + iNumTokens]: - sOutput += oToken.get_value() - print(f">>Seek[{sOutput}]<<") - - def push_seek_index(self): - self.lSeek.append(self.iSeek) - - def pop_seek_index(self): - self.iSeek = self.lSeek.pop() - - def push_current_index(self): - self.lCurrent.append(self.iCurrent) - - def pop_current_index(self): - self.iCurrent = self.lCurrent.pop() - self.iSeek = self.iCurrent + def set_filename(self, sString): + self.sFilename = sString def set_mark_index(self): self.iMark = self.iSeek - - def set_filename(self, sString): - self.sFilename = sString From 204fd295b669903213ed6ab972460ee699f5ca6e Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Fri, 11 Apr 2025 07:19:47 -0500 Subject: [PATCH 120/124] Removing unused method. --- vsg/data_structure.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index abc8b681f..d1e923e09 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -17,10 +17,6 @@ def __init__(self, lAllObjects): self.iSeek = 0 self.lSeek = [] - def advance_seek_index_to_current_index(self): - if self.iSeek < self.iCurrent: - self.iSeek = self.iCurrent - def advance_seek_over_parenthesis(self): if not self.seek_token_lower_value_is("("): return False @@ -256,6 +252,7 @@ def replace_tokens_from_current_to_mark_with(self, token): self.replace_next_token_with(token) self.advance_to_next_token() + # TODO: I believe this can eventually be removed when iSeek will always be equal to or larger than iCurrent def seek_to_next_token(self): # jcl - might need to watch out for going past the end of the lAllObjects list if self.iSeek < self.iCurrent: From c861eb7303d155334370b8498874b4cebcc95b6e Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Fri, 11 Apr 2025 07:29:23 -0500 Subject: [PATCH 121/124] Improved calculation of end of file index. --- vsg/data_structure.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index d1e923e09..2de115714 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -178,13 +178,13 @@ def increment_current_index(self): # self.iSeek = self.iCurrent def increment_seek_index(self): - # TODO: find a way to calculate the length of lAllObjects less frequent - if self.iSeek < len(self.lAllObjects) - 1: + # TODO: find a way to not do the comparison on every increment + if self.iSeek < self.iEndIndex: self.iSeek += 1 else: # raise exceptions.IndexedPassedEndOfFile() # exit() - self.iSeek = len(self.lAllObjects) - 1 + self.iSeek = self.iEndIndex def is_next_seek_token(self, sString): self.advance_to_next_seek_token() @@ -226,6 +226,7 @@ def replace_current_token_with(self, token): def replace_current_token_with_list_of_tokens(self, lTokens): self.lAllObjects.pop(self.get_current_index()) self.lAllObjects[self.get_current_index() : self.get_current_index()] = lTokens + self.iEndIndex = len(self.lAllObjects) - 1 def replace_next_token_required(self, sToken, token): if self.is_next_token(sToken): From 4a0a510409becce0d40ba6eb2b6c9a039e342d56 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sat, 12 Apr 2025 23:26:17 -0500 Subject: [PATCH 122/124] Refactoring to better separate iCurrent and iSeek. --- vsg/data_structure.py | 53 ++++++++----------- vsg/decorators.py | 30 +++++++++++ vsg/vhdlFile/classify/array_constraint.py | 10 ++-- vsg/vhdlFile/classify/attribute_name.py | 1 + .../component_instantiation_statement.py | 1 + .../concurrent_procedure_call_statement.py | 15 +++--- vsg/vhdlFile/classify/constraint.py | 18 +------ vsg/vhdlFile/classify/discrete_range.py | 9 ++-- vsg/vhdlFile/classify/element_constraint.py | 11 +--- vsg/vhdlFile/classify/index_constraint.py | 6 ++- vsg/vhdlFile/classify/procedure_call.py | 3 +- vsg/vhdlFile/classify/range.py | 8 ++- vsg/vhdlFile/classify/range_constraint.py | 2 + vsg/vhdlFile/classify/record_constraint.py | 1 + .../classify/record_element_constraint.py | 1 + .../classify/resolution_indication.py | 1 + .../classify/signal_assignment_statement.py | 9 ---- vsg/vhdlFile/classify/subtype_indication.py | 7 +-- 18 files changed, 88 insertions(+), 98 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 2de115714..447be5182 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -from vsg import exceptions, parser + +from vsg import exceptions, parser, decorators from vsg.vhdlFile.classify import utils @@ -36,7 +37,7 @@ def advance_to_next_token(self): for iIndex, oToken in enumerate(self.lAllObjects[self.iCurrent : :]): if type(oToken) == parser.item: self.iCurrent = self.iCurrent + iIndex -# self.iSeek = self.iCurrent + self.iSeek = self.iCurrent return True return False @@ -50,25 +51,21 @@ def advance_to_next_seek_token(self): def align_seek_index(self): self.iSeek = self.iCurrent - def are_next_consecutive_tokens(self, lTokens, bAlignSeekIndex=True): - # TODO: Remove bAlignSeekIndex. This decision should be made at a higher level - if bAlignSeekIndex: - self.align_seek_index() - myIndex = self.iSeek + @decorators.push_pop_seek_index + def are_next_consecutive_tokens(self, lTokens): for sToken in lTokens: - self.seek_to_next_token() + self.advance_to_next_seek_token() if sToken is not None: if not self.seek_token_lower_value_is(sToken): - if bAlignSeekIndex: - self.align_seek_index() return False self.increment_seek_index() - if bAlignSeekIndex: - self.align_seek_index() return True def at_end_of_file(self): - return self.iCurrent == self.iEndIndex + if self.iCurrent == self.iEndIndex: + # TODO: Raise an exception when this occurs + exit() + return False def current_token_lower_value_is(self, sString): return self.get_current_token_lower_value() == sString @@ -90,13 +87,15 @@ def does_seek_token_match_regex(self, oRegex): return True return False + @decorators.push_pop_seek_index def does_string_exist_before_string(self, sFirst, sSecond): - for oToken in self.lAllObjects[self.iCurrent : :]: + for oToken in self.lAllObjects[self.iSeek: :]: if oToken.lower_value == sSecond: return False if oToken.lower_value == sFirst: return True - + + @decorators.push_pop_seek_index def does_string_exist_before_mark_index_honoring_parenthesis_hierarchy(self, sString): iParen = 0 for iIndex in range(self.get_current_index(), self.iMark): @@ -135,15 +134,17 @@ def does_string_exist_before_string_honoring_parenthesis_hierarchy(self, sFirst, return False def does_string_exist_in_next_n_tokens(self, sString, iNumTokens): - self.iSeek = self.iCurrent return self.does_string_exist_in_next_n_tokens_from_seek_index(sString, iNumTokens) def does_string_exist_in_next_n_tokens_from_seek_index(self, sString, iNumTokens): + self.push_seek_index() for x in range(0, iNumTokens): - self.seek_to_next_token() + self.advance_to_next_seek_token() if self.seek_token_lower_value_is(sString): + self.pop_seek_index() return True self.increment_seek_index() + self.pop_seek_index() return False def get_current_index(self): @@ -175,7 +176,7 @@ def get_seek_token_lower_value(self): def increment_current_index(self): self.iCurrent += 1 -# self.iSeek = self.iCurrent + self.iSeek = self.iCurrent def increment_seek_index(self): # TODO: find a way to not do the comparison on every increment @@ -212,16 +213,19 @@ def pop_current_index(self): self.iCurrent = self.lCurrent.pop() self.iSeek = self.iCurrent + def pop_push_seek_index(self): + self.iSeek = self.lSeek[-1] + def pop_seek_index(self): self.iSeek = self.lSeek.pop() def remove_token_at_offset(self, iOffset): self.lAllObjects.pop(self.iCurrent + iOffset) + self.iEndIndex = len(self.lAllObjects) - 1 def replace_current_token_with(self, token): self.lAllObjects[self.iCurrent] = token(self.get_current_token_value()) self.increment_current_index() - self.align_seek_index() def replace_current_token_with_list_of_tokens(self, lTokens): self.lAllObjects.pop(self.get_current_index()) @@ -253,17 +257,6 @@ def replace_tokens_from_current_to_mark_with(self, token): self.replace_next_token_with(token) self.advance_to_next_token() - # TODO: I believe this can eventually be removed when iSeek will always be equal to or larger than iCurrent - def seek_to_next_token(self): - # jcl - might need to watch out for going past the end of the lAllObjects list - if self.iSeek < self.iCurrent: - self.iSeek = self.iCurrent - for iIndex, oToken in enumerate(self.lAllObjects[self.iSeek : :]): - if type(oToken) == parser.item: - self.iSeek = self.iSeek + iIndex - return True - return False - def seek_token_lower_value_is(self, sString): return self.get_seek_token_lower_value() == sString diff --git a/vsg/decorators.py b/vsg/decorators.py index 3aa1fea00..451c7c226 100644 --- a/vsg/decorators.py +++ b/vsg/decorators.py @@ -45,3 +45,33 @@ def wrapper(*args, **kwargs): return wrapper return decorator + + +def push_pop_seek_index(func): + @functools.wraps(func) + def wrapper(*args, **kwargs): + + args[0].push_seek_index() + + results = func(*args, **kwargs) + + args[0].pop_seek_index() + + return results + + return wrapper + + +def push_pop_current_index(func): + @functools.wraps(func) + def wrapper(*args, **kwargs): + + args[0].push_current_index() + + results = func(*args, **kwargs) + + args[0].pop_current_index() + + return results + + return wrapper diff --git a/vsg/vhdlFile/classify/array_constraint.py b/vsg/vhdlFile/classify/array_constraint.py index 2003f9371..e416a2b16 100644 --- a/vsg/vhdlFile/classify/array_constraint.py +++ b/vsg/vhdlFile/classify/array_constraint.py @@ -13,20 +13,17 @@ def detect(oDataStructure): | ( open ) [ array_element_constraint ] """ - oDataStructure.push_seek_index() + if open_detected(oDataStructure): classify_open(oDataStructure) array_element_constraint.detect(oDataStructure) - oDataStructure.pop_seek_index() return True - oDataStructure.pop_seek_index() - oDataStructure.push_seek_index() + if index_constraint.detect(oDataStructure): index_constraint.classify(oDataStructure) array_element_constraint.detect(oDataStructure) - oDataStructure.pop_seek_index() return True - oDataStructure.pop_seek_index() + return False @@ -43,6 +40,7 @@ def open_detected(oDataStructure): return oDataStructure.are_next_consecutive_tokens(["(", "open"]) +@decorators.print_classifier_debug_info(__name__) def classify_open(oDataStructure): oDataStructure.replace_next_token_with(token.open_parenthesis) oDataStructure.replace_next_token_with(token.open_keyword) diff --git a/vsg/vhdlFile/classify/attribute_name.py b/vsg/vhdlFile/classify/attribute_name.py index 08c92f1fe..2d756f47d 100644 --- a/vsg/vhdlFile/classify/attribute_name.py +++ b/vsg/vhdlFile/classify/attribute_name.py @@ -6,6 +6,7 @@ @decorators.print_classifier_debug_info(__name__) +@decorators.push_pop_seek_index def detect(oDataStructure): """ attribute_name ::= diff --git a/vsg/vhdlFile/classify/component_instantiation_statement.py b/vsg/vhdlFile/classify/component_instantiation_statement.py index 295ce2032..4772805dc 100644 --- a/vsg/vhdlFile/classify/component_instantiation_statement.py +++ b/vsg/vhdlFile/classify/component_instantiation_statement.py @@ -19,6 +19,7 @@ def detect(oDataStructure): [ generic_map_aspect ] [ port_map_aspect ] ; """ + if oDataStructure.are_next_consecutive_tokens([None, ":"]): oDataStructure.advance_to_next_seek_token() oDataStructure.increment_seek_index() diff --git a/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py b/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py index 66b17346b..d67a58d4d 100644 --- a/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py +++ b/vsg/vhdlFile/classify/concurrent_procedure_call_statement.py @@ -11,15 +11,18 @@ def detect(oDataStructure): concurrent_procedure_call_statement ::= [ label : ] [ postponed ] procedure_call ; """ + if procedure_call.detect(oDataStructure): - utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) + classify(oDataStructure) + return True + return False - oDataStructure.replace_next_token_with_if("postponed", token.postponed_keyword) - procedure_call.classify(oDataStructure) +def classify(oDataStructure): + utils.tokenize_label(oDataStructure, token.label_name, token.label_colon) - oDataStructure.replace_next_token_required(";", token.semicolon) + oDataStructure.replace_next_token_with_if("postponed", token.postponed_keyword) - return True + procedure_call.classify(oDataStructure) - return False + oDataStructure.replace_next_token_required(";", token.semicolon) diff --git a/vsg/vhdlFile/classify/constraint.py b/vsg/vhdlFile/classify/constraint.py index 8b506f6cc..3e2a506fe 100644 --- a/vsg/vhdlFile/classify/constraint.py +++ b/vsg/vhdlFile/classify/constraint.py @@ -5,6 +5,7 @@ @decorators.print_classifier_debug_info(__name__) +@decorators.push_pop_seek_index def detect(oDataStructure): """ constraint ::= @@ -13,28 +14,13 @@ def detect(oDataStructure): | record_constraint """ - oDataStructure.push_seek_index() if range_constraint.detect(oDataStructure): - oDataStructure.pop_seek_index() return True - oDataStructure.pop_seek_index() - oDataStructure.push_seek_index() if array_constraint.detect(oDataStructure): - oDataStructure.pop_seek_index() return True - oDataStructure.pop_seek_index() - oDataStructure.push_seek_index() if record_constraint.detect(oDataStructure): - oDataStructure.pop_seek_index() return True - oDataStructure.pop_seek_index() - oDataStructure.push_seek_index() - if array_constraint.detect_discrete_subtype_indication(oDataStructure): - oDataStructure.pop_seek_index() - return True - - oDataStructure.pop_seek_index() - return False + return array_constraint.detect_discrete_subtype_indication(oDataStructure) diff --git a/vsg/vhdlFile/classify/discrete_range.py b/vsg/vhdlFile/classify/discrete_range.py index 0e7a8d28c..4eb5d8627 100644 --- a/vsg/vhdlFile/classify/discrete_range.py +++ b/vsg/vhdlFile/classify/discrete_range.py @@ -10,19 +10,16 @@ def detect(oDataStructure): discrete_range ::= *discrete*_subtype_indication | range """ - oDataStructure.push_seek_index() - if oDataStructure.are_next_consecutive_tokens([None, "(", None, ")"], False): - oDataStructure.pop_seek_index() - oDataStructure.push_current_index() + if oDataStructure.are_next_consecutive_tokens([None, "(", None, ")"]): oDataStructure.iCurrent = oDataStructure.iSeek + oDataStructure.push_current_index() subtype_indication.classify(oDataStructure) - oDataStructure.pop_current_index() + return True - oDataStructure.pop_seek_index() return range.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/element_constraint.py b/vsg/vhdlFile/classify/element_constraint.py index 2f9b0c7b0..2de4636b9 100644 --- a/vsg/vhdlFile/classify/element_constraint.py +++ b/vsg/vhdlFile/classify/element_constraint.py @@ -12,16 +12,7 @@ def detect(oDataStructure): | record_constraint """ - oDataStructure.push_seek_index() if array_constraint.detect(oDataStructure): - oDataStructure.pop_seek_index() return True - oDataStructure.pop_seek_index() - oDataStructure.push_seek_index() - if record_constraint.detect(oDataStructure): - oDataStructure.pop_seek_index() - return True - - oDataStructure.pop_seek_index() - return False + return record_constraint.detect(oDataStructure) diff --git a/vsg/vhdlFile/classify/index_constraint.py b/vsg/vhdlFile/classify/index_constraint.py index fa68bb41f..bf8f9ce31 100644 --- a/vsg/vhdlFile/classify/index_constraint.py +++ b/vsg/vhdlFile/classify/index_constraint.py @@ -6,12 +6,14 @@ @decorators.print_classifier_debug_info(__name__) +@decorators.push_pop_seek_index +@decorators.push_pop_current_index def detect(oDataStructure): """ index_constraint ::= ( discrete_range { , discrete_range } ) """ - + if oDataStructure.is_next_seek_token("("): oDataStructure.increment_seek_index() if discrete_range.detect(oDataStructure): @@ -21,7 +23,7 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): - oDataStructure.replace_next_token_with(token.open_parenthesis) + oDataStructure.replace_next_token_required("(", token.open_parenthesis) while not oDataStructure.is_next_token(")"): discrete_range.classify_until([","], oDataStructure) diff --git a/vsg/vhdlFile/classify/procedure_call.py b/vsg/vhdlFile/classify/procedure_call.py index 60e494e62..7373151b8 100644 --- a/vsg/vhdlFile/classify/procedure_call.py +++ b/vsg/vhdlFile/classify/procedure_call.py @@ -8,6 +8,7 @@ @decorators.print_classifier_debug_info(__name__) +@decorators.push_pop_seek_index def detect(oDataStructure): """ Calling functions: @@ -26,11 +27,9 @@ def detect(oDataStructure): Differentiating a procedure call from anything else is essentially the absence of keywords. """ - oDataStructure.push_seek_index() if oDataStructure.does_string_exist_before_string_honoring_parenthesis_hierarchy("<=", ";"): return False - oDataStructure.pop_seek_index() while not oDataStructure.seek_token_lower_value_is(";"): if oDataStructure.get_seek_token_lower_value() in lExceptions: return False diff --git a/vsg/vhdlFile/classify/range.py b/vsg/vhdlFile/classify/range.py index 837861c48..ecf811e2b 100644 --- a/vsg/vhdlFile/classify/range.py +++ b/vsg/vhdlFile/classify/range.py @@ -11,15 +11,13 @@ def detect(oDataStructure): *range*_attribute_name | simple_expression direction simple_expression """ - oDataStructure.push_seek_index() - if oDataStructure.are_next_consecutive_tokens(["(", None, ")"]): + + if oDataStructure.are_next_consecutive_tokens([None, ")"]): return True - oDataStructure.pop_seek_index() - oDataStructure.push_seek_index() if attribute_name.detect(oDataStructure): return True - oDataStructure.pop_seek_index() + return detect_direction(oDataStructure) diff --git a/vsg/vhdlFile/classify/range_constraint.py b/vsg/vhdlFile/classify/range_constraint.py index 9bdf8e0dc..b5e863515 100644 --- a/vsg/vhdlFile/classify/range_constraint.py +++ b/vsg/vhdlFile/classify/range_constraint.py @@ -6,11 +6,13 @@ @decorators.print_classifier_debug_info(__name__) +@decorators.push_pop_seek_index def detect(oDataStructure): """ range_constraint ::= **range** range """ + if oDataStructure.is_next_token("range"): classify(oDataStructure) return True diff --git a/vsg/vhdlFile/classify/record_constraint.py b/vsg/vhdlFile/classify/record_constraint.py index b6b120eb6..63201b770 100644 --- a/vsg/vhdlFile/classify/record_constraint.py +++ b/vsg/vhdlFile/classify/record_constraint.py @@ -6,6 +6,7 @@ @decorators.print_classifier_debug_info(__name__) +@decorators.push_pop_seek_index def detect(oDataStructure): """ record_constraint ::= diff --git a/vsg/vhdlFile/classify/record_element_constraint.py b/vsg/vhdlFile/classify/record_element_constraint.py index 34a4ff561..eed942ff9 100644 --- a/vsg/vhdlFile/classify/record_element_constraint.py +++ b/vsg/vhdlFile/classify/record_element_constraint.py @@ -11,6 +11,7 @@ def detect(oDataStructure): record_element_constraint ::= record_element_simple_name element_constraint """ + if not oDataStructure.is_next_seek_token("("): oDataStructure.increment_seek_index() if oDataStructure.is_next_seek_token("("): diff --git a/vsg/vhdlFile/classify/resolution_indication.py b/vsg/vhdlFile/classify/resolution_indication.py index ab72c1442..def9ecf72 100644 --- a/vsg/vhdlFile/classify/resolution_indication.py +++ b/vsg/vhdlFile/classify/resolution_indication.py @@ -6,6 +6,7 @@ @decorators.print_classifier_debug_info(__name__) +@decorators.push_pop_seek_index def detect(oDataStructure): """ resolution_indication ::= diff --git a/vsg/vhdlFile/classify/signal_assignment_statement.py b/vsg/vhdlFile/classify/signal_assignment_statement.py index 50e8aa7aa..36d90a1c8 100644 --- a/vsg/vhdlFile/classify/signal_assignment_statement.py +++ b/vsg/vhdlFile/classify/signal_assignment_statement.py @@ -19,28 +19,19 @@ def detect(oDataStructure): | [ label : ] selected_signal_assignment """ - oDataStructure.push_seek_index() if selected_signal_assignment.detect(oDataStructure): utils.tokenize_label(oDataStructure, token.label, token.label_colon) selected_signal_assignment.classify(oDataStructure) - oDataStructure.pop_seek_index() return True - oDataStructure.pop_seek_index() - oDataStructure.push_seek_index() if conditional_signal_assignment.detect(oDataStructure): utils.tokenize_label(oDataStructure, token.label, token.label_colon) conditional_signal_assignment.classify(oDataStructure) - oDataStructure.pop_seek_index() return True - oDataStructure.pop_seek_index() - oDataStructure.push_seek_index() if simple_signal_assignment.detect(oDataStructure): utils.tokenize_label(oDataStructure, token.label, token.label_colon) simple_signal_assignment.classify(oDataStructure) - oDataStructure.pop_seek_index() return True - oDataStructure.pop_seek_index() return False diff --git a/vsg/vhdlFile/classify/subtype_indication.py b/vsg/vhdlFile/classify/subtype_indication.py index 4039bee68..8449b9c6c 100644 --- a/vsg/vhdlFile/classify/subtype_indication.py +++ b/vsg/vhdlFile/classify/subtype_indication.py @@ -10,14 +10,9 @@ def classify(oDataStructure): subtype_indication ::= [ resolution_indication ] type_mark [ constraint ] """ - oDataStructure.push_seek_index() + resolution_indication.detect(oDataStructure) - oDataStructure.pop_seek_index() - oDataStructure.push_seek_index() type_mark.classify(oDataStructure) - oDataStructure.pop_seek_index() - oDataStructure.push_seek_index() constraint.detect(oDataStructure) - oDataStructure.pop_seek_index() From 7706f340cafa92c66d93fdb1c1600e6b9c185d3a Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 13 Apr 2025 10:36:01 -0500 Subject: [PATCH 123/124] Minor cleanups. --- vsg/data_structure.py | 8 +------- vsg/vhdlFile/classify/resolution_indication.py | 3 +-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index 447be5182..db516d309 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -179,13 +179,7 @@ def increment_current_index(self): self.iSeek = self.iCurrent def increment_seek_index(self): - # TODO: find a way to not do the comparison on every increment - if self.iSeek < self.iEndIndex: - self.iSeek += 1 - else: - # raise exceptions.IndexedPassedEndOfFile() - # exit() - self.iSeek = self.iEndIndex + self.iSeek += 1 def is_next_seek_token(self, sString): self.advance_to_next_seek_token() diff --git a/vsg/vhdlFile/classify/resolution_indication.py b/vsg/vhdlFile/classify/resolution_indication.py index def9ecf72..5a70287c9 100644 --- a/vsg/vhdlFile/classify/resolution_indication.py +++ b/vsg/vhdlFile/classify/resolution_indication.py @@ -39,8 +39,7 @@ def classify_resolution_function_name(oDataStructure): @decorators.print_classifier_debug_info(__name__) def detect_element_resolution(oDataStructure): - # TODO: Can this be is_next_token instead of is_next_seek_token? - if oDataStructure.is_next_seek_token("("): + if oDataStructure.is_next_token("("): return True return False From d3abdc2e69cbd837e821a5f2682f926cbcb2849d Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Sun, 13 Apr 2025 10:47:41 -0500 Subject: [PATCH 124/124] Running style checks. --- vsg/data_structure.py | 6 +++--- vsg/decorators.py | 2 -- vsg/vhdlFile/classify/element_declaration.py | 1 - vsg/vhdlFile/classify/force_mode.py | 1 - vsg/vhdlFile/classify/range.py | 1 - vsg/vhdlFile/classify/record_constraint.py | 1 - vsg/vhdlFile/classify/resolution_indication.py | 2 +- vsg/vhdlFile/classify/utils.py | 6 +++--- 8 files changed, 7 insertions(+), 13 deletions(-) diff --git a/vsg/data_structure.py b/vsg/data_structure.py index db516d309..c8db67cfc 100644 --- a/vsg/data_structure.py +++ b/vsg/data_structure.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from vsg import exceptions, parser, decorators +from vsg import decorators, exceptions, parser from vsg.vhdlFile.classify import utils @@ -89,12 +89,12 @@ def does_seek_token_match_regex(self, oRegex): @decorators.push_pop_seek_index def does_string_exist_before_string(self, sFirst, sSecond): - for oToken in self.lAllObjects[self.iSeek: :]: + for oToken in self.lAllObjects[self.iSeek : :]: if oToken.lower_value == sSecond: return False if oToken.lower_value == sFirst: return True - + @decorators.push_pop_seek_index def does_string_exist_before_mark_index_honoring_parenthesis_hierarchy(self, sString): iParen = 0 diff --git a/vsg/decorators.py b/vsg/decorators.py index 451c7c226..93c347454 100644 --- a/vsg/decorators.py +++ b/vsg/decorators.py @@ -50,7 +50,6 @@ def wrapper(*args, **kwargs): def push_pop_seek_index(func): @functools.wraps(func) def wrapper(*args, **kwargs): - args[0].push_seek_index() results = func(*args, **kwargs) @@ -65,7 +64,6 @@ def wrapper(*args, **kwargs): def push_pop_current_index(func): @functools.wraps(func) def wrapper(*args, **kwargs): - args[0].push_current_index() results = func(*args, **kwargs) diff --git a/vsg/vhdlFile/classify/element_declaration.py b/vsg/vhdlFile/classify/element_declaration.py index becfd855e..e1dcdf0f3 100644 --- a/vsg/vhdlFile/classify/element_declaration.py +++ b/vsg/vhdlFile/classify/element_declaration.py @@ -19,7 +19,6 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) def classify(oDataStructure): - identifier_list.classify_until([":"], oDataStructure) oDataStructure.replace_next_token_required(":", token.colon) diff --git a/vsg/vhdlFile/classify/force_mode.py b/vsg/vhdlFile/classify/force_mode.py index f96660c8b..6ce6b3056 100644 --- a/vsg/vhdlFile/classify/force_mode.py +++ b/vsg/vhdlFile/classify/force_mode.py @@ -18,6 +18,5 @@ def detect(oDataStructure): def classify(oDataStructure): - oDataStructure.replace_next_token_with_if("in", token.in_keyword) oDataStructure.replace_next_token_with_if("out", token.out_keyword) diff --git a/vsg/vhdlFile/classify/range.py b/vsg/vhdlFile/classify/range.py index ecf811e2b..c6d80a383 100644 --- a/vsg/vhdlFile/classify/range.py +++ b/vsg/vhdlFile/classify/range.py @@ -23,7 +23,6 @@ def detect(oDataStructure): @decorators.print_classifier_debug_info(__name__) def detect_direction(oDataStructure): - if oDataStructure.does_string_exist_before_matching_close_parenthesis("downto", 0): return True if oDataStructure.does_string_exist_before_matching_close_parenthesis("to", 0): diff --git a/vsg/vhdlFile/classify/record_constraint.py b/vsg/vhdlFile/classify/record_constraint.py index 63201b770..b757c57ab 100644 --- a/vsg/vhdlFile/classify/record_constraint.py +++ b/vsg/vhdlFile/classify/record_constraint.py @@ -26,7 +26,6 @@ def classify(oDataStructure): oDataStructure.replace_next_token_required("(", token.open_parenthesis) while not oDataStructure.is_next_token(")"): - record_element_constraint.classify(oDataStructure) oDataStructure.replace_next_token_with_if(",", token.comma) oDataStructure.replace_next_token_required(")", token.close_parenthesis) diff --git a/vsg/vhdlFile/classify/resolution_indication.py b/vsg/vhdlFile/classify/resolution_indication.py index 5a70287c9..068a4f984 100644 --- a/vsg/vhdlFile/classify/resolution_indication.py +++ b/vsg/vhdlFile/classify/resolution_indication.py @@ -27,7 +27,7 @@ def classify_element_resolution(oDataStructure): oDataStructure.replace_next_token_required("(", token.open_parenthesis) element_resolution.classify(oDataStructure) -# utils.assign_tokens_until_matching_closing_paren(parser.todo, oDataStructure) + # utils.assign_tokens_until_matching_closing_paren(parser.todo, oDataStructure) oDataStructure.replace_next_token_required(")", token.close_parenthesis) diff --git a/vsg/vhdlFile/classify/utils.py b/vsg/vhdlFile/classify/utils.py index 5b125d86c..691d77549 100644 --- a/vsg/vhdlFile/classify/utils.py +++ b/vsg/vhdlFile/classify/utils.py @@ -230,14 +230,14 @@ def print_error_message(sToken, token, currentToken, oDataStructure): def calculate_column(oDataStructure): - iReturn = 0 + iReturn = 0 for iIndex in range(oDataStructure.iCurrent - 1, 0, -1): if isinstance(oDataStructure.lAllObjects[iIndex], parser.carriage_return): break iReturn += len(oDataStructure.lAllObjects[iIndex].get_value()) iReturn += 1 - return iReturn - + return iReturn + def extract_module_name(token): return token.__module__.split(".")[-1]