aboutsummaryrefslogtreecommitdiffstats
path: root/src/libraries.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-08-16 22:31:06 +0200
committerTristan Gingold <tgingold@free.fr>2019-08-17 21:40:42 +0200
commit7d034fc52f6b15e743ca91e7b1a4314bf31623b9 (patch)
tree60c6c4deb857b89e5d9f86b55d9fee8160313545 /src/libraries.adb
parent60b4bf2b63cdad9cfd36106f084fcbe94d01d4d5 (diff)
downloadghdl-7d034fc52f6b15e743ca91e7b1a4314bf31623b9.tar.gz
ghdl-7d034fc52f6b15e743ca91e7b1a4314bf31623b9.tar.bz2
ghdl-7d034fc52f6b15e743ca91e7b1a4314bf31623b9.zip
vhdl: parse verification unit (WIP).
Diffstat (limited to 'src/libraries.adb')
-rw-r--r--src/libraries.adb34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/libraries.adb b/src/libraries.adb
index 8dba5683d..cbdca93c0 100644
--- a/src/libraries.adb
+++ b/src/libraries.adb
@@ -507,21 +507,17 @@ package body Libraries is
else
Library_Unit := Create_Iir (Iir_Kind_Package_Declaration);
end if;
- when Tok_With =>
- if Library_Unit = Null_Iir
- or else
- Get_Kind (Library_Unit) /= Iir_Kind_Architecture_Body
- then
- Log_Line ("load_library: invalid use of 'with'");
- raise Internal_Error;
- end if;
- Scan_Expect (Tok_Configuration);
- Scan_Expect (Tok_Colon);
- Scan;
- goto Next_Line;
when Tok_Context =>
- Library_Unit :=
- Create_Iir (Iir_Kind_Context_Declaration);
+ Library_Unit := Create_Iir (Iir_Kind_Context_Declaration);
+ Scan;
+ when Tok_Vunit =>
+ Library_Unit := Create_Iir (Iir_Kind_Vunit_Declaration);
+ Scan;
+ when Tok_Vmode =>
+ Library_Unit := Create_Iir (Iir_Kind_Vmode_Declaration);
+ Scan;
+ when Tok_Vprop =>
+ Library_Unit := Create_Iir (Iir_Kind_Vprop_Declaration);
Scan;
when others =>
Log_Line
@@ -606,7 +602,6 @@ package body Libraries is
Last_Design_Unit := Design_Unit;
Set_Last_Design_Unit (Design_File, Design_Unit);
end if;
- << Next_Line >> null;
end loop;
Set_Date (Library, Max_Date);
@@ -1402,6 +1397,15 @@ package body Libraries is
when Iir_Kind_Context_Declaration =>
WR ("context ");
WR (Image_Identifier (Library_Unit));
+ when Iir_Kind_Vunit_Declaration =>
+ WR ("vunit ");
+ WR (Image_Identifier (Library_Unit));
+ when Iir_Kind_Vprop_Declaration =>
+ WR ("vprop ");
+ WR (Image_Identifier (Library_Unit));
+ when Iir_Kind_Vmode_Declaration =>
+ WR ("vmode ");
+ WR (Image_Identifier (Library_Unit));
when others =>
Error_Kind ("save_library", Library_Unit);
end case;