aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-10-15 18:18:49 +0200
committerTristan Gingold <tgingold@free.fr>2016-10-15 18:18:49 +0200
commitdebfbffe7fe77a51bbba85d84147cac3d806df2a (patch)
treecb8f0c860a759dca07b527090ba46552e360fb1b
parent6c9ac1f1ba0492c2d5add773d2024dd163b31db4 (diff)
downloadghdl-debfbffe7fe77a51bbba85d84147cac3d806df2a.tar.gz
ghdl-debfbffe7fe77a51bbba85d84147cac3d806df2a.tar.bz2
ghdl-debfbffe7fe77a51bbba85d84147cac3d806df2a.zip
ghdlxml: add version.
-rw-r--r--src/ghdldrv/ghdlxml.adb25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/ghdldrv/ghdlxml.adb b/src/ghdldrv/ghdlxml.adb
index 329af4658..6641202a0 100644
--- a/src/ghdldrv/ghdlxml.adb
+++ b/src/ghdldrv/ghdlxml.adb
@@ -198,23 +198,26 @@ package body Ghdlxml is
Put_Empty_Stag_End;
end Disp_Iir_List_Ref;
- procedure Disp_Iir_Chain (Id : String; N : Iir)
+ procedure Disp_Iir_Chain_Elements (Chain : Iir)
is
El : Iir;
begin
+ El := Chain;
+ while Is_Valid (El) loop
+ Disp_Iir ("el", El);
+ El := Get_Chain (El);
+ end loop;
+ end Disp_Iir_Chain_Elements;
+
+ procedure Disp_Iir_Chain (Id : String; N : Iir) is
+ begin
if N = Null_Iir then
return;
end if;
Put_Stag (Id);
Put_Stag_End;
-
- El := N;
- while Is_Valid (El) loop
- Disp_Iir ("el", El);
- El := Get_Chain (El);
- end loop;
-
+ Disp_Iir_Chain_Elements (N);
Put_Etag (Id);
end Disp_Iir_Chain;
@@ -513,7 +516,11 @@ package body Ghdlxml is
Col := 0;
Put_Line
("<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?>");
- Disp_Iir_Chain ("root", Libraries.Get_Libraries_Chain);
+ Put_Stag ("root");
+ Put_Attribute ("version", "0.13");
+ Put_Stag_End;
+ Disp_Iir_Chain_Elements (Libraries.Get_Libraries_Chain);
+ Put_Etag ("root");
exception
when Compilation_Error =>
Error ("xml dump failed due to compilation error");