diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-22 09:28:08 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-22 09:28:08 +0000 |
commit | 3650407089bb99b17186ab7dabc4e0a4ad72306c (patch) | |
tree | 3382b1929ce73dcbba9d81c17a6d7dac301b444b /gcc/ada/g-regpat.ads | |
parent | 3f6ff945054e6d846f182b8f56d4ad1fe9605fd5 (diff) | |
download | gcc-3650407089bb99b17186ab7dabc4e0a4ad72306c.tar.gz |
2003-10-22 Arnaud Charlet <charlet@act-europe.fr>
* gnat_wrapper.adb: New file.
2003/10/22 Jerome Roussel <roussel@act-europe.fr>
* g-regpat.ads, g-regpat.adb (Match): new function, to know if a
string match a pre compiled regular expression (the corresponding
version of the function working on a raw regular expression)
Fix typos in various comments
Update copyright notice in spec
2003/10/21 Gary Dismukes <dismukes@gnat.com>
* exp_ch3.adb:
(Component_Needs_Simple_Initialization): Return False when the type is a
packed bit array. Revise spec comments to document this case.
* exp_prag.adb:
(Expand_Pragma_Import): Set any expression on the imported object to
empty to avoid initializing imported objects (in particular this
covers the case of zero-initialization of bit arrays).
Update copyright notice.
2003/10/21 Ed Schonberg <schonberg@gnat.com>
* sem_ch12.adb:
(Load_Parent_Of_Generic): If parent is compilation unit, stop search,
a subunit is missing.
(Instantiate_Subprogram_Body): If body of function is missing, set type
of return expression explicitly in dummy body, to prevent cascaded
errors when a subunit is missing.
Fixes PR 5677.
* sem_ch3.adb:
(Access_Subprogram_Declaration): Verify that return type is valid.
Fixes PR 8693.
* sem_elab.adb:
(Check_Elab_Calls): Do not apply elaboration checks if the main unit is
generic.
Fixes PR 12318.
* sem_util.adb:
(Corresponding_Discriminant): If the scope of the discriminant is a
private type without discriminant, use its full view.
Fixes PR 8247.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72792 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-regpat.ads')
-rw-r--r-- | gcc/ada/g-regpat.ads | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/gcc/ada/g-regpat.ads b/gcc/ada/g-regpat.ads index ba00b04a5cd..52ab3c19e29 100644 --- a/gcc/ada/g-regpat.ads +++ b/gcc/ada/g-regpat.ads @@ -7,7 +7,7 @@ -- S p e c -- -- -- -- Copyright (C) 1986 by University of Toronto. -- --- Copyright (C) 1996-2002 Ada Core Technologies, Inc. -- +-- Copyright (C) 1996-2003 Ada Core Technologies, Inc. -- -- -- -- 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- -- @@ -475,7 +475,7 @@ pragma Preelaborate (Regpat); (Expression : String; Data : String; Size : Program_Size := 0; - Data_First : Integer := -1; + Data_First : Integer := -1; Data_Last : Positive := Positive'Last) return Natural; -- Return the position where Data matches, or (Data'First - 1) if @@ -492,7 +492,7 @@ pragma Preelaborate (Regpat); (Expression : String; Data : String; Size : Program_Size := 0; - Data_First : Integer := -1; + Data_First : Integer := -1; Data_Last : Positive := Positive'Last) return Boolean; -- Return True if Data matches Expression. Match raises Storage_Error @@ -517,10 +517,20 @@ pragma Preelaborate (Regpat); Data : String; Data_First : Integer := -1; Data_Last : Positive := Positive'Last) - return Natural; + return Natural; + -- Match Data using the given pattern matcher. -- Return the position where Data matches, or (Data'First - 1) if there is - -- no match. Raises Expression_Error if Expression is not a legal regular - -- expression. + -- no match. + -- + -- See description of Data_First and Data_Last above. + + function Match + (Self : Pattern_Matcher; + Data : String; + Data_First : Integer := -1; + Data_Last : Positive := Positive'Last) + return Boolean; + -- Return True if Data matches using the given pattern matcher. -- -- See description of Data_First and Data_Last above. @@ -534,7 +544,6 @@ pragma Preelaborate (Regpat); Data_First : Integer := -1; Data_Last : Positive := Positive'Last); -- Match Data using the given pattern matcher and store result in Matches. - -- Raises Expression_Error if Expression is not a legal regular expression. -- The expression matches if Matches (0) /= No_Match. -- -- At most Matches'Length parenthesis are returned. |