diff options
author | Tristan Gingold | 2015-12-22 21:48:58 +0100 |
---|---|---|
committer | Tristan Gingold | 2015-12-23 08:15:10 +0100 |
commit | c1c8b00b8fb88f8550a6da4db7aff869b6976df9 (patch) | |
tree | d72a1e6b02ec347648df1b50df9b53251b1969a2 /src | |
parent | 1120e5730857dc06e1a49d6ad178b1367b383351 (diff) | |
download | ghdl-c1c8b00b8fb88f8550a6da4db7aff869b6976df9.tar.gz ghdl-c1c8b00b8fb88f8550a6da4db7aff869b6976df9.tar.bz2 ghdl-c1c8b00b8fb88f8550a6da4db7aff869b6976df9.zip |
Remove unused code (scanner).
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/parse.adb | 10 | ||||
-rw-r--r-- | src/vhdl/scanner.adb | 10 | ||||
-rw-r--r-- | src/vhdl/scanner.ads | 1 |
3 files changed, 3 insertions, 18 deletions
diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb index d3d6442..edcdb7a 100644 --- a/src/vhdl/parse.adb +++ b/src/vhdl/parse.adb @@ -16,7 +16,6 @@ -- Software Foundation, 59 Temple Place - Suite 330, Boston, MA -- 02111-1307, USA. with Iir_Chains; use Iir_Chains; -with Ada.Text_IO; use Ada.Text_IO; with Tokens; use Tokens; with Scanner; use Scanner; with Iirs_Utils; use Iirs_Utils; @@ -117,13 +116,6 @@ package body Parse is if Current_Token /= Tok_Identifier then Invalidate_Current_Token; end if; - exception - when Parse_Error => - Put_Line ("found " & Token_Type'Image (Current_Token)); - if Current_Token = Tok_Identifier then - Put_Line ("identifier: " & Name_Table.Image (Current_Identifier)); - end if; - raise; end Expect; -- Scan a token and expect it. @@ -3230,7 +3222,7 @@ package body Parse is -- precond : COMPONENT -- postcond: ';' -- - -- [ §4.5 ] + -- [ LRM93 4.5 ] -- component_declaration ::= -- COMPONENT identifier [ IS ] -- [ LOCAL_generic_clause ] diff --git a/src/vhdl/scanner.adb b/src/vhdl/scanner.adb index 2eeac14..ce91aba 100644 --- a/src/vhdl/scanner.adb +++ b/src/vhdl/scanner.adb @@ -60,6 +60,7 @@ package body Scanner is -- The characters included in each of the categories of basic graphic -- characters are defined as follows: type Character_Array is array (Character) of Character_Kind_Type; + pragma Suppress_Initialization (Character_Array); Characters_Kind : constant Character_Array := (NUL .. BS => Invalid, @@ -141,7 +142,6 @@ package body Scanner is Pos: Source_Ptr; Token_Pos: Source_Ptr; File_Len: Source_Ptr; - File_Name: Name_Id; Token: Token_Type; Prev_Token: Token_Type; Str_Id : String8_Id; @@ -150,6 +150,7 @@ package body Scanner is Int64: Iir_Int64; Fp64: Iir_Fp64; end record; + pragma Suppress_Initialization (Scan_Context); -- The current context. -- Default value is an invalid context. @@ -160,7 +161,6 @@ package body Scanner is Pos => 0, Token_Pos => 0, File_Len => 0, - File_Name => Null_Identifier, Token => Tok_Invalid, Prev_Token => Tok_Invalid, Identifier => Null_Identifier, @@ -213,11 +213,6 @@ package body Scanner is return Current_Context.Fp64; end Current_Iir_Fp64; - function Get_Current_File return Name_Id is - begin - return Current_Context.File_Name; - end Get_Current_File; - function Get_Current_Source_File return Source_File_Entry is begin return Current_Context.Source_File; @@ -278,7 +273,6 @@ package body Scanner is Pos => N_Source'First, Token_Pos => 0, -- should be invalid, File_Len => Get_File_Length (Source_File), - File_Name => Get_File_Name (Source_File), Token => Tok_Invalid, Prev_Token => Tok_Invalid, Identifier => Null_Identifier, diff --git a/src/vhdl/scanner.ads b/src/vhdl/scanner.ads index 6a5e1cf..297debc 100644 --- a/src/vhdl/scanner.ads +++ b/src/vhdl/scanner.ads @@ -104,7 +104,6 @@ package Scanner is -- Get the current location, or the location of the current token. -- Since a token cannot spread over lines, file and line of the current -- token are the same as those of the current position. - function Get_Current_File return Name_Id; function Get_Current_Source_File return Source_File_Entry; function Get_Current_Line return Natural; function Get_Current_Column return Natural; |