aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/scanner.adb5
-rw-r--r--src/vhdl/sem.adb4
2 files changed, 4 insertions, 5 deletions
diff --git a/src/vhdl/scanner.adb b/src/vhdl/scanner.adb
index c24706ec1..c8e5a9765 100644
--- a/src/vhdl/scanner.adb
+++ b/src/vhdl/scanner.adb
@@ -2277,8 +2277,9 @@ package body Scanner is
end if;
when '_' =>
Error_Msg_Scan ("an identifier can't start with '_'");
- Pos := Pos + 1;
- goto Again;
+ Scan_Identifier (Flag_Psl);
+ -- Cannot be a reserved word.
+ return;
when 'A' .. 'Z' | 'a' .. 'z' =>
Scan_Identifier (Flag_Psl);
Identifier_To_Token;
diff --git a/src/vhdl/sem.adb b/src/vhdl/sem.adb
index 89babd3fc..7cecd3d6b 100644
--- a/src/vhdl/sem.adb
+++ b/src/vhdl/sem.adb
@@ -3281,6 +3281,7 @@ package body Sem is
-- Analyze the library unit.
if Library_Unit /= Null_Iir then
+ -- Can be null_iir in case of parse error.
case Iir_Kinds_Library_Unit (Get_Kind (Library_Unit)) is
when Iir_Kind_Entity_Declaration =>
Sem_Entity_Declaration (Library_Unit);
@@ -3297,9 +3298,6 @@ package body Sem is
when Iir_Kind_Context_Declaration =>
Sem_Context_Declaration (Library_Unit);
end case;
- else
- pragma Assert (Flags.Flag_Force_Analysis);
- null;
end if;
Close_Declarative_Region;