Key Identifiers
In your update to the question, you suggest: {letter}({underscore}?{letter_or_digit})* . This is what the VHDL specification offers for expression. It is also worth noting that base identifiers are case insensitive . That is, id and id treated in the same way as the same identifiers.
Extended identifiers
However, VHDL also has extended identifiers. It would be a suitable regular expression for them:
({backslash}{Any ISO 8859-1 except backslash}*{backslash})+
Reserved Words
Also note that the following identifiers are not traditionally processed and are reserved words: this is a list from the 2002 specification. Depending on the version of the specification that you are implementing, there may be more or less reserved words.
abs access after alias all and architecture array assert attribute begin block body buffer bus case component configuration constant disconnect downto else elsif end entity exit file for function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedural procedure process protected pure range record reference register reject rem report return rol ror select severity shared signal sla sll sra srl subtype then to transport type unaffected units until use variable wait when while with xnor xor
Letter
It is also worth noting that in VHDL [A-Za-z] not all letters are in the alphabet. You must also include the Latin characters ISO 8859-1. You can find more information about these symbols here .
But, to say it, here are additional capital letters:
À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß
And here are the additional lowercase letters:
à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ
source share