summaryrefslogtreecommitdiff
path: root/src/vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/parse.adb7
-rw-r--r--src/vhdl/scanner.adb7
2 files changed, 6 insertions, 8 deletions
diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb
index b3a8cd9..cb8537e 100644
--- a/src/vhdl/parse.adb
+++ b/src/vhdl/parse.adb
@@ -209,7 +209,7 @@ package body Parse is
-- precond : next token
-- postcond: next token.
--
- -- [§ 4.3.2 ]
+ -- [ LRM93 4.3.2 ]
-- mode ::= IN | OUT | INOUT | BUFFER | LINKAGE
--
-- If there is no mode, DEFAULT is returned.
@@ -238,9 +238,8 @@ package body Parse is
Scan;
return Iir_Buffer_Mode;
when others =>
- Error_Msg_Parse
- ("mode is 'in', 'out', 'inout', 'buffer' or 'linkage'");
- return Iir_In_Mode;
+ -- Cannot happen.
+ raise Internal_Error;
end case;
end Parse_Mode;
diff --git a/src/vhdl/scanner.adb b/src/vhdl/scanner.adb
index 84efbe4..2eeac14 100644
--- a/src/vhdl/scanner.adb
+++ b/src/vhdl/scanner.adb
@@ -336,9 +336,9 @@ package body Scanner is
Offset: Natural;
File_Entry : Source_File_Entry;
begin
- if Current_Context.Source = null then
- raise Internal_Error;
- end if;
+ -- Scanner must have been initialized.
+ pragma Assert (Current_Context.Source /= null);
+
Current_Token := Tok_Invalid;
Current_Context.Pos := Position;
Loc := File_Pos_To_Location (Current_Context.Source_File,
@@ -793,7 +793,6 @@ package body Scanner is
if Vhdl_Std = Vhdl_87 then
Error_8bit;
end if;
- Len := Len + 1;
C := Ada.Characters.Handling.To_Lower (C);
when Digit =>
raise Internal_Error;