diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-12-21 20:56:15 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-12-21 20:56:15 +0100 |
commit | db9290e7b92232440a93179c779cad4edeff9719 (patch) | |
tree | 9a05f28cafdce98e79b30f710aedeaf42499fcb4 /src/vhdl/vhdl-parse.adb | |
parent | d45f4a31e557d54314765265d8f488a45dc8fc30 (diff) | |
download | ghdl-db9290e7b92232440a93179c779cad4edeff9719.tar.gz ghdl-db9290e7b92232440a93179c779cad4edeff9719.tar.bz2 ghdl-db9290e7b92232440a93179c779cad4edeff9719.zip |
vhdl-parse: handle 'end for' in configuration specification.
Fix #2277
Diffstat (limited to 'src/vhdl/vhdl-parse.adb')
-rw-r--r-- | src/vhdl/vhdl-parse.adb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb index 044f74e79..b61e6ab49 100644 --- a/src/vhdl/vhdl-parse.adb +++ b/src/vhdl/vhdl-parse.adb @@ -4614,6 +4614,15 @@ package body Vhdl.Parse is -- [ LRM93 5.2 ] -- configuration_specification ::= -- FOR component_specification binding_indication ; + -- + -- [ LRM08 7.3 Configuration specification ] + -- configuration_specification ::= + -- simple_configuration_specification + -- | compound_configuration_specification + -- + -- simple_configuration_specification ::= + -- FOR component_specification binding_indication ; + -- [ END FOR ; ] function Parse_Configuration_Specification return Iir_Configuration_Specification is @@ -4631,6 +4640,20 @@ package body Vhdl.Parse is -- Skip ';'. Scan_Semi_Colon_Declaration ("configuration specification"); + if Current_Token = Tok_End then + Check_Vhdl_At_Least_2008 ("'end for'"); + Set_Has_End (Res, True); + + -- Skip 'end'. + Scan; + + -- Skip 'for'. + Expect_Scan (Tok_For, "'for' expected after 'end'"); + + -- Skip ';'. + Scan_Semi_Colon ("';' expected after 'end for'"); + end if; + return Res; end Parse_Configuration_Specification; |