aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem_decls.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-07-03 07:30:34 +0200
committerTristan Gingold <tgingold@free.fr>2019-07-03 07:30:34 +0200
commit7e46a516106dc02905e1c85e1d653c05fbe2292a (patch)
tree46d549881d7118e5edde53fb75640302cb12365b /src/vhdl/vhdl-sem_decls.ads
parenta11d847187413ad04a6d98c1e867ccb5e385abe5 (diff)
downloadghdl-7e46a516106dc02905e1c85e1d653c05fbe2292a.tar.gz
ghdl-7e46a516106dc02905e1c85e1d653c05fbe2292a.tar.bz2
ghdl-7e46a516106dc02905e1c85e1d653c05fbe2292a.zip
vhdl: add anonymous_signal_declaration.
Diffstat (limited to 'src/vhdl/vhdl-sem_decls.ads')
-rw-r--r--src/vhdl/vhdl-sem_decls.ads14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/vhdl/vhdl-sem_decls.ads b/src/vhdl/vhdl-sem_decls.ads
index f22cd8791..3ab43adf8 100644
--- a/src/vhdl/vhdl-sem_decls.ads
+++ b/src/vhdl/vhdl-sem_decls.ads
@@ -75,9 +75,14 @@ package Vhdl.Sem_Decls is
procedure Pop_Signals_Declarative_Part
(Cell: in Implicit_Signal_Declaration_Type);
- -- Declare an implicit signal.
+ -- Declare an implicit signal. This is called from sem_names when a
+ -- signal attribute is analyzed.
procedure Add_Declaration_For_Implicit_Signal (Sig : Iir);
+ -- Append declaration SIG (for an anonymous signal) to the current
+ -- declarative part.
+ procedure Add_Implicit_Declaration (Sig : Iir);
+
private
type Implicit_Signal_Declaration_Type is record
-- Declaration or statement than will contain implicit declarations.
@@ -92,10 +97,13 @@ private
-- If True, declarations of DECLS_PARENT have already been analyzed.
-- So implicit declarations are appended to the parent, and the last
- -- declaration is LAST_DECL.
+ -- declaration is LAST_DECL. This is the usual case when attribute
+ -- signals are used in statements.
-- If False, declarations are being analyzed. Implicit declarations
-- are appended to IMPLICIT_DECL/LAST_ATTRIBUTE_SIGNAL and will be
- -- inserted before the current declaration.
+ -- inserted before the current declaration. This can happen if a
+ -- attribute signal is used in a declaration, the attribute signal
+ -- must be declared before it is used.
Decls_Analyzed : Boolean;
-- Last declaration in the region. If an implicit_decl is createed, it