mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 16:29:25 +02:00
Identifiers are case-insensitive in VHDL
So translate them to lower case so that internally I don't have to constantly worry about it. Note that even keywords are case insensitive, so do the translation BEFORE the keyword check.
This commit is contained in:
+4
-2
@@ -104,7 +104,7 @@ based_integer [0-9a-fA-F](_?[0-9a-fA-F])*
|
||||
return CHARACTER_LITERAL;
|
||||
}
|
||||
|
||||
(\"([^"]|(\"\"))*?\")|(\"[^\"]*\") {
|
||||
(\"([^\"]|(\"\"))*?\")|(\"[^\"]*\") {
|
||||
/* first pattern: string literals with doubled quotation mark */
|
||||
/* second pattern: string literals without doubled quotation */
|
||||
yylval.text = escape_quot_and_dup(yytext);
|
||||
@@ -112,7 +112,9 @@ based_integer [0-9a-fA-F](_?[0-9a-fA-F])*
|
||||
return STRING_LITERAL;
|
||||
}
|
||||
|
||||
[a-zA-Z][a-zA-Z0-9_]* {
|
||||
[a-zA-Z_][a-zA-Z0-9_]* {
|
||||
for (char*cp = yytext ; *cp ; cp += 1)
|
||||
*cp = tolower(*cp);
|
||||
int rc = lexor_keyword_code(yytext, yyleng);
|
||||
switch (rc) {
|
||||
case IDENTIFIER:
|
||||
|
||||
Reference in New Issue
Block a user