From 89551a8e7e3c004f1fec71c877ebccbea11e083f Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 30 Nov 2018 21:02:34 +0100 Subject: parse: strenghten. --- src/vhdl/parse.adb | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'src/vhdl') diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb index 492fd0395..b72aa5a89 100644 --- a/src/vhdl/parse.adb +++ b/src/vhdl/parse.adb @@ -7562,11 +7562,10 @@ package body Parse is Parse_Declarative_Part (Res); end if; - Expect (Tok_Begin); Begin_Loc := Get_Token_Location; -- Eat 'begin'. - Scan; + Expect_Scan (Tok_Begin); Parse_Concurrent_Statements (Res); @@ -7696,8 +7695,7 @@ package body Parse is -- Skip 'end' End_Loc := Get_Token_Location; - Expect (Tok_End); - Scan; + Expect_Scan (Tok_End); if Vhdl_Std >= Vhdl_08 and then Current_Token /= Tok_Generate then -- This is the 'end' of the generate_statement_body. @@ -7877,8 +7875,7 @@ package body Parse is -- Skip 'generate' Generate_Loc := Get_Token_Location; - Expect (Tok_Generate); - Scan; + Expect_Scan (Tok_Generate); Parse_Generate_Statement_Body (Res, Alt_Label, Bod, End_Loc); @@ -7932,18 +7929,15 @@ package body Parse is -- Skip identifier Scan; - Expect (Tok_Colon); - -- Skip ':' - Scan; + Expect_Scan (Tok_Colon); else Alt_Label := Null_Identifier; end if; -- Skip 'generate' Generate_Loc := Get_Token_Location; - Expect (Tok_Generate); - Scan; + Expect_Scan (Tok_Generate); Parse_Generate_Statement_Body (Res, Alt_Label, Bod, End_Loc); if Alt_Label /= Null_Identifier then @@ -7963,11 +7957,9 @@ package body Parse is end if; end if; - Expect (Tok_Generate); - Set_End_Has_Reserved_Id (Res, True); - -- Skip 'generate' - Scan; + Expect_Scan (Tok_Generate); + Set_End_Has_Reserved_Id (Res, True); -- LRM93 9.7 -- If a label appears at the end of a generate statement, it must repeat -- cgit v1.2.3