diff --git a/vsg/vhdlFile/classify/discrete_range.py b/vsg/vhdlFile/classify/discrete_range.py index 8bf99a41..8466fbb2 100644 --- a/vsg/vhdlFile/classify/discrete_range.py +++ b/vsg/vhdlFile/classify/discrete_range.py @@ -47,6 +47,11 @@ def classify_until(lUntils, iToken, lObjects): elif iOpenParenthesis == iCloseParenthesis: if lObjects[iCurrent].get_lower_value() in lUntils: break + elif utils.is_next_token("'", iToken, lObjects): + # Ensure that range attributes are not misidentified as range keywords. + utils.assign_token(lObjects, iCurrent, parser.todo) + iCurrent = utils.find_next_token(iCurrent, lObjects) + utils.assign_token(lObjects, iCurrent, parser.todo) elif utils.is_next_token("range", iToken, lObjects): utils.assign_token(lObjects, iCurrent, range_constraint.range_keyword) else: