diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-15 13:59:42 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-15 13:59:42 +0000 |
commit | c1ed6e1f156fc7a1231f292e6459dae1bac798c5 (patch) | |
tree | d12db436be0ea44fa62d4a3cc69df254440d013c /gcc/ada/g-regpat.adb | |
parent | 430527407d6166da222953c8e7f46acdb3c27b04 (diff) | |
download | gcc-c1ed6e1f156fc7a1231f292e6459dae1bac798c5.tar.gz |
* g-regpat.adb (Fail): raise Expression_Error including the diagnostic
message, friendlier.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106984 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-regpat.adb')
-rw-r--r-- | gcc/ada/g-regpat.adb | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/gcc/ada/g-regpat.adb b/gcc/ada/g-regpat.adb index 33e22b48c8a..c52b5f2c894 100644 --- a/gcc/ada/g-regpat.adb +++ b/gcc/ada/g-regpat.adb @@ -7,7 +7,7 @@ -- B o d y -- -- -- -- Copyright (C) 1986 by University of Toronto. -- --- Copyright (C) 1996-2004 Ada Core Technologies, Inc. -- +-- Copyright (C) 1999-2005, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -129,7 +129,7 @@ package body GNAT.Regpat is -- Complex loops CURLYX, -- 2num node Match this complex thing {n,m} times - -- The nums are coded on two characters each. + -- The nums are coded on two characters each WHILEM, -- no Do curly processing and see if rest matches @@ -233,15 +233,15 @@ package body GNAT.Regpat is procedure Set_In_Class (Bitmap : in out Character_Class; C : Character); - -- Set the entry to True for C in the class Bitmap. + -- Set the entry to True for C in the class Bitmap function Get_From_Class (Bitmap : Character_Class; C : Character) return Boolean; - -- Return True if the entry is set for C in the class Bitmap. + -- Return True if the entry is set for C in the class Bitmap procedure Reset_Class (Bitmap : out Character_Class); - -- Clear all the entries in the class Bitmap. + -- Clear all the entries in the class Bitmap pragma Inline (Set_In_Class); pragma Inline (Get_From_Class); @@ -282,7 +282,7 @@ package body GNAT.Regpat is function Get_Next_Offset (Program : Program_Data; IP : Pointer) return Pointer; - -- Get the offset field of a node. Used by Get_Next. + -- Get the offset field of a node. Used by Get_Next function Get_Next (Program : Program_Data; @@ -295,7 +295,7 @@ package body GNAT.Regpat is function Read_Natural (Program : Program_Data; IP : Pointer) return Natural; - -- Return the 2-byte natural coded at position IP. + -- Return the 2-byte natural coded at position IP -- All of the subprograms above are tiny and should be inlined @@ -389,10 +389,10 @@ package body GNAT.Regpat is -- Return value is the location of new opcode, ie old Emit_Ptr. procedure Emit_Natural (IP : Pointer; N : Natural); - -- Split N on two characters at position IP. + -- Split N on two characters at position IP procedure Emit_Class (Bitmap : Character_Class); - -- Emits a character class. + -- Emits a character class procedure Case_Emit (C : Character); -- Emit C, after converting is to lower-case if the regular @@ -454,7 +454,7 @@ package body GNAT.Regpat is function Next_Instruction (P : Pointer) return Pointer; -- Dig the "next" pointer out of a node - procedure Fail (M : in String); + procedure Fail (M : String); pragma No_Return (Fail); -- Fail with a diagnostic message, if possible @@ -572,9 +572,9 @@ package body GNAT.Regpat is -- Fail -- ---------- - procedure Fail (M : in String) is + procedure Fail (M : String) is begin - raise Expression_Error; + raise Expression_Error with M; end Fail; ------------------------- @@ -845,7 +845,7 @@ package body GNAT.Regpat is -- makes it hard to avoid. procedure Parse - (Parenthesized : in Boolean; + (Parenthesized : Boolean; Flags : out Expression_Flags; IP : out Pointer) is @@ -1206,7 +1206,7 @@ package body GNAT.Regpat is Parse_Pos := Parse_Pos + 1; end if; - -- First character can be ] or -, without closing the class. + -- First character can be ] or - without closing the class if Parse_Pos <= Parse_End and then (Expression (Parse_Pos) = ']' @@ -2389,7 +2389,7 @@ package body GNAT.Regpat is type Natural_Array is array (Match_Count range <>) of Natural; Matches_Tmp : Natural_Array (Matches_Full'Range); - -- Save the opening position of parenthesis. + -- Save the opening position of parenthesis Last_Paren : Natural := 0; -- Last parenthesis seen @@ -2414,7 +2414,7 @@ package body GNAT.Regpat is -- operators for complex expressions. Current_Curly : Current_Curly_Access := null; - -- The curly currently being processed. + -- The curly currently being processed ----------------------- -- Local Subprograms -- @@ -2430,7 +2430,7 @@ package body GNAT.Regpat is -- It only matches on things of length 1. -- Starting from Input_Pos, it matches at most Max CURLY. - function Try (Pos : in Positive) return Boolean; + function Try (Pos : Positive) return Boolean; -- Try to match at specific point function Match (IP : Pointer) return Boolean; @@ -2465,7 +2465,7 @@ package body GNAT.Regpat is pragma Inline (Index); pragma Inline (Repeat); - -- These are two complex functions, but used only once. + -- These are two complex functions, but used only once pragma Inline (Match_Whilem); pragma Inline (Match_Simple_Operator); @@ -3002,10 +3002,10 @@ package body GNAT.Regpat is Ln : Natural := 0; Lastloc : constant Natural := Cc.Lastloc; - -- Detection of 0-len. + -- Detection of 0-len begin - -- If degenerate scan matches "", assume scan done. + -- If degenerate scan matches "", assume scan done if Input_Pos = Cc.Lastloc and then N >= Cc.Min @@ -3031,7 +3031,7 @@ package body GNAT.Regpat is return False; end if; - -- First, just match a string of min scans. + -- First, just match a string of min scans if N < Cc.Min then Cc.Cur := N; @@ -3046,7 +3046,7 @@ package body GNAT.Regpat is return False; end if; - -- Prefer next over scan for minimal matching. + -- Prefer next over scan for minimal matching if not Cc.Greedy then Current_Curly := Cc.Old_Cc; @@ -3240,7 +3240,7 @@ package body GNAT.Regpat is -- Try -- --------- - function Try (Pos : in Positive) return Boolean is + function Try (Pos : Positive) return Boolean is begin Input_Pos := Pos; Last_Paren := 0; |