diff --git a/vsg/tests/rule_list/extract_violation_dictionary_w_all_phases_enabled.json b/vsg/tests/rule_list/extract_violation_dictionary_w_all_phases_enabled.json index c3b0c370..299b3b75 100644 --- a/vsg/tests/rule_list/extract_violation_dictionary_w_all_phases_enabled.json +++ b/vsg/tests/rule_list/extract_violation_dictionary_w_all_phases_enabled.json @@ -1453,32 +1453,32 @@ { "rule": "generate_002", "linenumber": 357, - "solution": "Add 1 space(s) between spi_sck_cpol_0_proc and spi_sck_cpol_0_proc" + "solution": "Add 1 space(s) between spi_sck_cpol_0_proc and :" }, { "rule": "generate_002", "linenumber": 362, - "solution": "Add 1 space(s) between spi_sck_cpol_1_proc and spi_sck_cpol_1_proc" + "solution": "Add 1 space(s) between spi_sck_cpol_1_proc and :" }, { "rule": "generate_002", "linenumber": 369, - "solution": "Add 1 space(s) between samp_ce_cpha_0_proc and samp_ce_cpha_0_proc" + "solution": "Add 1 space(s) between samp_ce_cpha_0_proc and :" }, { "rule": "generate_002", "linenumber": 374, - "solution": "Add 1 space(s) between samp_ce_cpha_1_proc and samp_ce_cpha_1_proc" + "solution": "Add 1 space(s) between samp_ce_cpha_1_proc and :" }, { "rule": "generate_002", "linenumber": 380, - "solution": "Add 1 space(s) between fsm_ce_cpha_0_proc and fsm_ce_cpha_0_proc" + "solution": "Add 1 space(s) between fsm_ce_cpha_0_proc and :" }, { "rule": "generate_002", "linenumber": 385, - "solution": "Add 1 space(s) between fsm_ce_cpha_1_proc and fsm_ce_cpha_1_proc" + "solution": "Add 1 space(s) between fsm_ce_cpha_1_proc and :" }, { "rule": "generate_003", @@ -2028,12 +2028,12 @@ { "rule": "if_015", "linenumber": 443, - "solution": "Change spaces between end and end to 1" + "solution": "Change spaces between end and if to 1" }, { "rule": "if_015", "linenumber": 451, - "solution": "Change spaces between end and end to 1" + "solution": "Change spaces between end and if to 1" }, { "rule": "if_030", @@ -2993,12 +2993,12 @@ { "rule": "process_024", "linenumber": 321, - "solution": "Add 1 space(s) between spi_2x_ce_gen_proc and spi_2x_ce_gen_proc" + "solution": "Add 1 space(s) between spi_2x_ce_gen_proc and :" }, { "rule": "process_024", "linenumber": 436, - "solution": "Add 1 space(s) between in_transfer_proc and in_transfer_proc" + "solution": "Add 1 space(s) between in_transfer_proc and :" }, { "rule": "process_026", diff --git a/vsg/vhdlFile/classify/case_generate_statement.py b/vsg/vhdlFile/classify/case_generate_statement.py index 4d5a5fb1..03191ed4 100644 --- a/vsg/vhdlFile/classify/case_generate_statement.py +++ b/vsg/vhdlFile/classify/case_generate_statement.py @@ -19,6 +19,10 @@ from vsg.vhdlFile.classify import case_generate_alternative def detect(iToken, lObjects): if utils.are_next_consecutive_tokens([None, ':', 'case'], iToken, lObjects): return classify(iToken, lObjects) + if utils.are_next_consecutive_tokens(['case'], iToken, lObjects): + 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 diff --git a/vsg/vhdlFile/classify/for_generate_statement.py b/vsg/vhdlFile/classify/for_generate_statement.py index 37bee2d7..48726861 100644 --- a/vsg/vhdlFile/classify/for_generate_statement.py +++ b/vsg/vhdlFile/classify/for_generate_statement.py @@ -18,6 +18,10 @@ def detect(iToken, lObjects): if utils.are_next_consecutive_tokens([None, ':', 'for'], iToken, lObjects): return classify(iToken, lObjects) + if utils.are_next_consecutive_tokens(['for'], iToken, lObjects): + 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 diff --git a/vsg/vhdlFile/classify/if_generate_statement.py b/vsg/vhdlFile/classify/if_generate_statement.py index 9031d204..b9af06cd 100644 --- a/vsg/vhdlFile/classify/if_generate_statement.py +++ b/vsg/vhdlFile/classify/if_generate_statement.py @@ -22,6 +22,10 @@ def detect(iToken, lObjects): if utils.are_next_consecutive_tokens([None, ':', 'if'], iToken, lObjects): return classify(iToken, lObjects) + if utils.are_next_consecutive_tokens(['if'], iToken, lObjects): + 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 diff --git a/vsg/vhdlFile/utils.py b/vsg/vhdlFile/utils.py index 2a5cc888..0b768ccc 100644 --- a/vsg/vhdlFile/utils.py +++ b/vsg/vhdlFile/utils.py @@ -391,8 +391,9 @@ def print_error_message(sToken, token, iToken, lObjects): iLine = calculate_line_number(iToken, lObjects) iColumn = calculate_column(iToken, lObjects) sModuleName = extract_module_name(token) - print(f'Error: Unknown token in {sModuleName}({iLine}:{iColumn})') - print(f' Expecting {sToken}, found {sFoundToken}') + print(f'Error: Unexpected token detected while parsing {sModuleName} @ Line {iLine}, Column {iColumn}') + print(f' Expecting : {sToken}') + print(f' Found : {sFoundToken}') exit()